-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from zolplay-cn/dev
Sync dev to main
- Loading branch information
Showing
12 changed files
with
1,799 additions
and
4,973 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
'use client' | ||
|
||
import { redirect, useSearchParams } from 'next/navigation' | ||
import { useEffect } from 'react' | ||
|
||
export function UWUHandler() { | ||
const query = useSearchParams() | ||
|
||
useEffect(() => { | ||
if (query?.has('uwu')) { | ||
if (query.get('uwu') === '0') { | ||
localStorage.removeItem('uwu') | ||
} else { | ||
localStorage.setItem('uwu', '1') | ||
} | ||
redirect('/') | ||
} | ||
}, [query]) | ||
return null | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default function Page() { | ||
return <div>og</div> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import { getMessages } from '~/i18n.server' | ||
import type { Metadata } from 'next' | ||
|
||
export async function generateMetadata({ | ||
params, | ||
}: { | ||
params: RootParams | ||
}): Promise<Metadata> { | ||
const messages = await getMessages(params) | ||
|
||
return { | ||
title: { | ||
default: messages.Root.Metadata.Title, | ||
template: messages.Root.Metadata.TitleTemplate, | ||
}, | ||
themeColor: [ | ||
{ media: '(prefers-color-scheme: dark)', color: '#1c1917' }, | ||
{ media: '(prefers-color-scheme: light)', color: '#fafaf9' }, | ||
], | ||
description: messages.Root.Metadata.Description, | ||
keywords: messages.Root.Metadata.Keywords, | ||
icons: { | ||
icon: '/assets/favicon-32x32.png', | ||
shortcut: '/assets/favicon.ico', | ||
apple: '/assets/apple-touch-icon.png', | ||
}, | ||
manifest: '/assets/site.webmanifest', | ||
openGraph: { | ||
title: { | ||
default: messages.Root.Metadata.Title, | ||
template: messages.Root.Metadata.TitleTemplate, | ||
}, | ||
description: messages.Root.Metadata.Description, | ||
siteName: messages.Root.Metadata.Title, | ||
locale: params.locale, | ||
type: 'website', | ||
images: ['https://assets.moimoi.app/zolplay-logo-uwu.png'], | ||
}, | ||
robots: { | ||
index: true, | ||
follow: true, | ||
googleBot: { | ||
index: true, | ||
follow: true, | ||
'max-video-preview': -1, | ||
'max-image-preview': 'large', | ||
'max-snippet': -1, | ||
}, | ||
}, | ||
twitter: { | ||
site: '@zolplay', | ||
creator: '@thecalicastle', | ||
card: 'summary_large_image', | ||
}, | ||
} | ||
} | ||
|
||
export default function UWUPage() { | ||
// redirect('/') | ||
return <div>uwu</div> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { useLocalStorage } from 'foxact/use-local-storage' | ||
|
||
export const useUWU = () => { | ||
return useLocalStorage('uwu', false)[0] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.