fix: use fallbackData to prepare user data during SSR (#2968)

pull/2947/head
Ryan Cohen 2 years ago committed by GitHub
parent 3b2633812b
commit 6e60a275c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -125,6 +125,9 @@ const CoreApp: Omit<NextAppComponentType, 'origGetInitialProps'> = ({
<SWRConfig
value={{
fetcher: (url) => axios.get(url).then((res) => res.data),
fallback: {
'/api/v1/auth/me': user,
},
}}
>
<LanguageContext.Provider value={{ locale: currentLocale, setLocale }}>

Loading…
Cancel
Save