fix: update <h1> tag in index page when tags are present
This commit is contained in:
parent
865b5bc31a
commit
b7dffe8b52
1 changed files with 2 additions and 1 deletions
|
|
@ -34,6 +34,7 @@ export async function generateMetadata({ searchParams }: Props): Promise<Metadat
|
||||||
|
|
||||||
export default async function Page({ searchParams }: Props) {
|
export default async function Page({ searchParams }: Props) {
|
||||||
const session = await auth();
|
const session = await auth();
|
||||||
|
const { tags } = await searchParams;
|
||||||
|
|
||||||
if (session?.user && !session.user.username) {
|
if (session?.user && !session.user.username) {
|
||||||
redirect("/create-username");
|
redirect("/create-username");
|
||||||
|
|
@ -41,7 +42,7 @@ export default async function Page({ searchParams }: Props) {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<h1 className="sr-only">TomodachiShare - index page</h1>
|
<h1 className="sr-only">{tags ? `Miis tagged with '${tags}' - TomodachiShare` : "TomodachiShare - index mii list"}</h1>
|
||||||
|
|
||||||
<Suspense fallback={<Skeleton />}>
|
<Suspense fallback={<Skeleton />}>
|
||||||
<MiiList searchParams={await searchParams} />
|
<MiiList searchParams={await searchParams} />
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue