diff --git a/api/tests/functional/place.spec.ts b/api/tests/functional/place.spec.ts index 7ed6462..de4b69e 100644 --- a/api/tests/functional/place.spec.ts +++ b/api/tests/functional/place.spec.ts @@ -59,10 +59,12 @@ test.group('Place', (group) => { const response = await client.post(`/places/${illustration.id}`).bearerToken(loggedInUser.body().token).json(place) response.assertStatus(200) + // console.log(response.body()) assert.equal(response.body().message, 'Created successfully') - assert.equal(response.body().place.user_id,goodUser.id) assert.isNumber(response.body().id) + const savedPlace = await Place.find(response.body().id) + assert.equal(savedPlace.user_id,goodUser.id) }) diff --git a/frontend/public/GitHub-Mark-32px.png b/frontend/public/GitHub-Mark-32px.png deleted file mode 100644 index 8b25551..0000000 Binary files a/frontend/public/GitHub-Mark-32px.png and /dev/null differ diff --git a/frontend/public/GitHub-Mark-Light-32px.png b/frontend/public/GitHub-Mark-Light-32px.png deleted file mode 100644 index 628da97..0000000 Binary files a/frontend/public/GitHub-Mark-Light-32px.png and /dev/null differ diff --git a/frontend/public/favicon.ico b/frontend/public/favicon.ico index 718d6fe..16d7339 100644 Binary files a/frontend/public/favicon.ico and b/frontend/public/favicon.ico differ diff --git a/frontend/public/next.svg b/frontend/public/next.svg deleted file mode 100644 index 5174b28..0000000 --- a/frontend/public/next.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/frontend/public/thirteen.svg b/frontend/public/thirteen.svg deleted file mode 100644 index 8977c1b..0000000 --- a/frontend/public/thirteen.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/frontend/public/vercel.svg b/frontend/public/vercel.svg deleted file mode 100644 index d2f8422..0000000 --- a/frontend/public/vercel.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/frontend/src/components/Flash.tsx b/frontend/src/components/Flash.tsx index 7fdd13f..df06601 100644 --- a/frontend/src/components/Flash.tsx +++ b/frontend/src/components/Flash.tsx @@ -2,13 +2,13 @@ import { Transition } from '@headlessui/react' import { useAppSelector, useAppDispatch } from '@/hooks' import { useTimeoutFn } from 'react-use' import { selectFlash, setFlash, selectFlashMessage } from '@/features/flash/reducer' +import { useEffect, useState } from 'react' export default function Flash() { const flashOpen = useAppSelector(selectFlash) const flash = useAppSelector(selectFlashMessage) const dispatch = useAppDispatch() - useTimeoutFn(() => dispatch(setFlash(false)), 3500) const handleClose = () => { dispatch(setFlash(false)) }; @@ -32,6 +32,18 @@ export default function Flash() { info: 'border-blue-500', } + useEffect(() => { + const timeId = setTimeout(() => { + handleClose() + }, 2500) + + return () => { + clearTimeout(timeId) + } + }, [flashOpen]); + + if (!flashOpen) return <>> + return (