diff --git a/components/Alert.tsx b/components/Alert.tsx index 1bafb49..a78fcac 100644 --- a/components/Alert.tsx +++ b/components/Alert.tsx @@ -1,6 +1,15 @@ -export default function Alert({ children }: { children: React.ReactNode }) { +import { ReactNode, useContext } from "react"; +import { ErrorContext } from "./App"; + +export default function Alert({ children }: { children: ReactNode }) { + const { setError } = useContext(ErrorContext); + + function onClick() { + setError(undefined); + } + return ( -