1
Fork 0
mirror of https://github.com/Steffo99/festa.git synced 2024-12-22 14:44:21 +00:00

Simulate save delay

This commit is contained in:
Steffo 2022-07-17 02:31:04 +02:00
parent 20004526da
commit 45c3e2071f
Signed by: steffo
GPG key ID: 6965406171929D01

View file

@ -16,6 +16,7 @@ import { ToolToggleVisibility } from '../../components/postcard/toolbar/toolTogg
import { WIPBanner } from '../../components/generic/wip/banner'
import { AuthContext } from '../../components/auth/base'
import { useDefinedContext } from '../../utils/definedContext'
import { asleep } from '../../utils/asleep'
export async function getServerSideProps(context: NextPageContext) {
@ -43,7 +44,8 @@ const PageEvent: NextPage<PageEventProps> = ({ slug }) => {
const displayDescription = data?.description ?? ""
const saveEdits = useCallback(
() => {
async () => {
await asleep(1000)
mutate()
},
[]