mirror of
https://github.com/Steffo99/festa.git
synced 2024-12-22 22:54:22 +00:00
Simulate save delay
This commit is contained in:
parent
20004526da
commit
45c3e2071f
1 changed files with 3 additions and 1 deletions
|
@ -16,6 +16,7 @@ import { ToolToggleVisibility } from '../../components/postcard/toolbar/toolTogg
|
||||||
import { WIPBanner } from '../../components/generic/wip/banner'
|
import { WIPBanner } from '../../components/generic/wip/banner'
|
||||||
import { AuthContext } from '../../components/auth/base'
|
import { AuthContext } from '../../components/auth/base'
|
||||||
import { useDefinedContext } from '../../utils/definedContext'
|
import { useDefinedContext } from '../../utils/definedContext'
|
||||||
|
import { asleep } from '../../utils/asleep'
|
||||||
|
|
||||||
|
|
||||||
export async function getServerSideProps(context: NextPageContext) {
|
export async function getServerSideProps(context: NextPageContext) {
|
||||||
|
@ -43,7 +44,8 @@ const PageEvent: NextPage<PageEventProps> = ({ slug }) => {
|
||||||
const displayDescription = data?.description ?? ""
|
const displayDescription = data?.description ?? ""
|
||||||
|
|
||||||
const saveEdits = useCallback(
|
const saveEdits = useCallback(
|
||||||
() => {
|
async () => {
|
||||||
|
await asleep(1000)
|
||||||
mutate()
|
mutate()
|
||||||
},
|
},
|
||||||
[]
|
[]
|
||||||
|
|
Loading…
Reference in a new issue