diff --git a/ui/src/app/error.tsx b/ui/src/app/error.tsx new file mode 100644 index 00000000..b100986d --- /dev/null +++ b/ui/src/app/error.tsx @@ -0,0 +1,30 @@ +'use client'; + +import { useState } from 'react'; +import ApiErrorModal from '@/components/modal/api-error-modal'; + +interface ErrorProps { + reset: () => void; +} + +const Error = ({ reset }: ErrorProps) => { + const [open, setOpen] = useState(true); + + const handleClose = () => { + setOpen(false); + reset(); + }; + + return ( +
+ {open && ( + + )} +
+ ); +}; + +export default Error; diff --git a/ui/src/app/layout.tsx b/ui/src/app/layout.tsx index 30116baf..c3dd7247 100644 --- a/ui/src/app/layout.tsx +++ b/ui/src/app/layout.tsx @@ -25,13 +25,13 @@ const RootLayout = ({ }: Readonly<{ children?: React.ReactNode; }>) => ( - - - -
{children}
-