Skip to content

Commit

Permalink
Merge pull request #31 from zolplay-cn/dev
Browse files Browse the repository at this point in the history
Sync dev to main
  • Loading branch information
thecuvii authored May 12, 2024
2 parents 793ce95 + 41961bd commit ff7e2ec
Show file tree
Hide file tree
Showing 3 changed files with 4,981 additions and 1,668 deletions.
20 changes: 0 additions & 20 deletions app/UWUHandler.tsx

This file was deleted.

21 changes: 19 additions & 2 deletions app/[locale]/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import {
PostHogPageview,
PHProvider as PostHogProvider,
} from '../PostHogProvider'
import { UWUHandler } from '../UWUHandler'

const fontSansEn = Manrope({
weight: ['400', '500', '700'],
Expand Down Expand Up @@ -106,10 +105,17 @@ export default async function RootLayout({
suppressHydrationWarning
className={`font-sans ${fontSansEn.variable}`}
>
<head>
<script
dangerouslySetInnerHTML={{
__html: `${uwu.toString()};uwu()`,
}}
/>
</head>
<Suspense>
<PostHogPageview />
</Suspense>
<UWUHandler />

<PostHogProvider>
<body className="bg-stone-50 text-stone-800 dark:bg-stone-900 dark:text-stone-300">
<ThemeProvider
Expand Down Expand Up @@ -140,3 +146,14 @@ export default async function RootLayout({
</html>
)
}

function uwu() {
const query = new URLSearchParams(location.search)
if (query?.has('uwu')) {
if (query.get('uwu') === '0' || query.get('uwu') === 'false') {
localStorage.removeItem('uwu')
} else {
localStorage.setItem('uwu', '1')
}
}
}
Loading

0 comments on commit ff7e2ec

Please sign in to comment.