Skip to content

Commit

Permalink
add maintenance mode (#491)
Browse files Browse the repository at this point in the history
* add maintenance mode
  • Loading branch information
0xBigBoss authored Jun 28, 2024
1 parent 2412c5b commit 8b71517
Showing 1 changed file with 30 additions and 1 deletion.
31 changes: 30 additions & 1 deletion apps/next/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ import { Provider } from 'app/provider'
import { projectId, config as wagmiConfig } from 'app/provider/wagmi/config'
import { createWeb3Modal } from '@web3modal/wagmi/react'
import { baseMainnetClient } from '@my/wagmi'
import { YStack, H1, H2 } from '@my/ui'
import { IconSendLogo } from 'app/components/icons'

createWeb3Modal({
wagmiConfig,
Expand Down Expand Up @@ -73,11 +75,38 @@ function MyApp({
}}
>
<Provider initialSession={pageProps.initialSession}>
{getLayout(<Component {...pageProps} />)}
{process.env.NEXT_PUBLIC_MAINTENANCE_MODE === 'true' ? (
<MaintenanceMode />
) : (
getLayout(<Component {...pageProps} />)
)}
</Provider>
</NextThemeProvider>
</>
)
}

export default api.withTRPC(MyApp)

function MaintenanceMode() {
return (
<YStack
ai="center"
jc="center"
w="100%"
h="100%"
$gtMd={{
ai: 'flex-start',
jc: 'flex-start',
}}
>
<IconSendLogo size={'$2.5'} color="$color12" />
<H1 $gtMd={{ size: '$8' }} fontWeight={'300'} color="$color12">
currently undergoing maintenance
</H1>
<H2 $gtMd={{ size: '$6' }} fontWeight={'300'} color="$color12">
We will be back shortly!
</H2>
</YStack>
)
}

0 comments on commit 8b71517

Please sign in to comment.