Skip to content

Commit

Permalink
Type fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jamdelion committed Sep 2, 2024
1 parent 287f3ba commit cefb523
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion editor.planx.uk/src/components/Toast/Toast.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ const Toast = ({ message, type = "success", id }: ToastProps) => {
const toast = useToast();

const handleCloseToast = () => {
toast.remove(id);
if (toast) {
toast.remove(id);
} else {
console.warn("ToastContext is not provided.");
}
};

return (
Expand Down
1 change: 1 addition & 0 deletions editor.planx.uk/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import HelmetProvider from "react-navi-helmet-async";
import { ToastContainer } from "react-toastify";

// init airbrake before everything else
import * as airbrake from "./airbrake";
import DelayedLoadingIndicator from "./components/DelayedLoadingIndicator";
import { client } from "./lib/graphql";
import navigation from "./lib/navigation";
Expand Down

0 comments on commit cefb523

Please sign in to comment.