File tree Expand file tree Collapse file tree 3 files changed +11
-13
lines changed
Expand file tree Collapse file tree 3 files changed +11
-13
lines changed Original file line number Diff line number Diff line change @@ -3,5 +3,6 @@ module.exports = {
33 output : process . env . STANDALONE && 'standalone' ,
44 experimental : { instrumentationHook : true } ,
55 images : { remotePatterns : [ { hostname : 'source.unsplash.com' } ] } ,
6- rewrites : ( ) => [ { source : '/api/wing/:path*' , destination : `${ process . env . WING_API_URL } /:path*` } ]
6+ rewrites : ( ) => [ { source : '/api/wing/:path*' , destination : `${ process . env . WING_API_URL } /:path*` } ] ,
7+ reactStrictMode : false
78}
Original file line number Diff line number Diff line change 22
33import dayjs from 'dayjs'
44import duration from 'dayjs/plugin/duration'
5- import { FC , ReactNode , useState } from 'react'
5+ import { FC , ReactNode } from 'react'
66import { useAsync } from 'react-use'
77import { LoadingSpinner } from '~/components/LoadingSpinner'
88import { initializeEditor } from '~/editor'
99import { initializeI18n } from '~/i18n'
1010
1111export const Bootstrap : FC < { children : ReactNode } > = ( { children } ) => {
12- const [ loading , setLoading ] = useState ( true )
13-
14- useAsync ( async ( ) => {
15- setLoading ( true )
16-
12+ const { loading } = useAsync ( async ( ) => {
1713 dayjs . extend ( duration )
18- await initializeI18n ( )
19- await initializeEditor ( )
2014
21- setLoading ( false )
22- } )
15+ try {
16+ await initializeI18n ( )
17+ await initializeEditor ( )
18+ } catch { }
19+ } , [ ] )
2320
2421 if ( loading ) {
2522 return (
Original file line number Diff line number Diff line change @@ -21,9 +21,9 @@ export const resources = {
2121} as const
2222
2323export const initializeI18n = async ( ) => {
24- await i18n . use ( detectLanguage ) . use ( initReactI18next ) . init ( {
25- lng : LANG . enUS ,
24+ await i18n . use ( initReactI18next ) . use ( detectLanguage ) . init ( {
2625 resources,
26+ fallbackLng : LANG . enUS ,
2727 returnNull : false
2828 } )
2929
You can’t perform that action at this time.
0 commit comments