Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
"@typeform/embed-react": "^3.20.0",
"@vercel/analytics": "^1.4.1",
"@wagmi/core": "2.19.0",
"@zerodev/passkey-validator": "^5.5.0",
"@zerodev/sdk": "5.4.0",
"@zerodev/passkey-validator": "^5.6.0",
"@zerodev/sdk": "5.5.0",
"auto-text-size": "^0.2.3",
"autoprefixer": "^10.4.20",
"chakra-ui-steps": "^2.1.0",
Expand Down
981 changes: 559 additions & 422 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

36 changes: 26 additions & 10 deletions src/app/maintenance/page.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,30 @@
import Layout from '@/components/Global/Layout'
'use client'
import chillPeanutAnim from '@/animations/GIF_ALPHA_BACKGORUND/512X512_ALPHA_GIF_konradurban_01.gif'
import { Button } from '@/components/0_Bruddle'
import Image from 'next/image'
import { useRouter } from 'next/navigation'

export default function MaintenancePage() {
const MaintenancePage = () => {
const router = useRouter()
return (
<Layout>
<div className="flex min-h-screen flex-col items-center justify-center">
<h1 className="mb-4 text-4xl font-bold">Under Maintenance</h1>
<p className="text-xl">
This feature is currently undergoing maintenance. We apologize for the inconvenience.
</p>
</div>
</Layout>
<div className="flex h-screen flex-col items-center justify-center gap-4 p-6">
<Image src={chillPeanutAnim.src} alt="Maintenance" width={250} height={250} />
<h1 className="text-3xl font-bold text-black">Under Maintenance</h1>
<p className="text-center text-lg text-gray-1">
We are currently going through maintenance. We should be back online shortly. Sorry for the
inconvenience.
</p>
<p className="text-center text-gray-1">Thank you for your patience.</p>

<Button
variant="transparent"
onClick={() => router.push('/support')}
className="h-5 w-fit p-0 underline underline-offset-2"
>
Contact Support?
</Button>
</div>
)
}

export default MaintenancePage
7 changes: 4 additions & 3 deletions src/components/Global/Layout/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use client'

import { Banner } from '@/components/Global/Banner'
import Footer from '@/components/Global/Footer'
import { GenericBanner } from '@/components/Global/Banner'
import { ThemeProvider } from '@/config'
import { useFooterVisibility } from '@/context/footerVisibility'
import { Widget } from '@typeform/embed-react'
Expand Down Expand Up @@ -39,7 +38,9 @@ const Layout = ({ children, className }: LayoutProps) => {
<ThemeProvider>
<div className="relative">
<div className="flex min-h-screen flex-col ">
<Banner />
{/* <Banner /> */}
{/* @dev note: temp, remove banner later */}
<GenericBanner message="Under maintenance" icon="⚠️" />
<div className="flex grow justify-center">
<div
className={`4xl:max-w-full flex grow flex-col justify-center pb-2 pt-6 sm:mx-auto sm:px-16 md:px-5 lg:px-6 2xl:px-8 ${className}`}
Expand Down
2 changes: 1 addition & 1 deletion src/context/kernelClient.context.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const createPasskeyValidator = async (publicClient: PublicClient, webAuth
webAuthnKey,
entryPoint: USER_OP_ENTRY_POINT,
kernelVersion: ZERODEV_KERNEL_VERSION,
validatorContractVersion: PasskeyValidatorContractVersion.V0_0_2,
validatorContractVersion: PasskeyValidatorContractVersion.V0_0_2_UNPATCHED,
})
}

Expand Down
38 changes: 37 additions & 1 deletion src/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,24 @@
import { NextResponse } from 'next/server'

export function middleware(request: NextRequest) {
const { pathname } = request.nextUrl
const maintenanceMode = true

if (maintenanceMode) {
const allowedPaths = ['/', '/maintenance', '/apple-app-site-association', '/support']
if (
!allowedPaths.includes(pathname) &&
!pathname.startsWith('/api/') &&
!pathname.startsWith('/_next/') &&
!pathname.startsWith('/.well-known/') &&
!pathname.match(
/.*\.(jpg|jpeg|png|gif|svg|ico|ttf|woff|woff2|eot|css|js|json|xml|txt|mp3|mp4|webm|ogg|wav|flac|aac)$/
)
) {
return NextResponse.redirect(new URL('/maintenance', request.url))
}
}

const url = request.nextUrl.clone()
const promoList: { [key: string]: string } = JSON.parse(process.env.PROMO_LIST ?? '{}')

Expand Down Expand Up @@ -46,5 +64,23 @@

// Updated matcher to include root path
export const config = {
matcher: ['/', '/claim/:path*', '/api/:path*'],
matcher: [
'/',
'/home',
'/claim/:path*',
'/api/:path*',
'/home/:path*',
'/profile/:path*',
'/send/:path*',
'/request/:path*',
'/settings/:path*',
'/setup/:path*',
'/share/:path*',
'/history/:path*',
'/raffle/:path*',
'/c/:path*',
'/pay/:path*',
'/p/:path*',
'/link/:path*',
],
}
Loading