2
0

perf(e2e): ️ Migrate to Playwright

This commit is contained in:
Baptiste Arnaud
2022-01-28 09:42:31 +01:00
parent c5aaa323d1
commit 73f277fce7
145 changed files with 3104 additions and 2346 deletions

View File

@ -82,11 +82,6 @@ export const UserContext = ({ children }: { children: ReactNode }) => {
setIsSaving(false)
}
const refreshUser = async () => {
await fetch('/api/auth/session?update')
reloadSession()
}
return (
<userContext.Provider
value={{
@ -105,6 +100,11 @@ export const UserContext = ({ children }: { children: ReactNode }) => {
)
}
export const refreshUser = async () => {
await fetch('/api/auth/session?update')
reloadSession()
}
const reloadSession = () => {
const event = new Event('visibilitychange')
document.dispatchEvent(event)