perf(e2e): ⚡️ Migrate to Playwright
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user