refactor: move offscreen metadata images from index to mii page
This commit is contained in:
parent
d372050def
commit
779e5550a3
2 changed files with 12 additions and 12 deletions
|
|
@ -1,4 +1,5 @@
|
||||||
import { Metadata } from "next";
|
import { Metadata } from "next";
|
||||||
|
import Image from "next/image";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { redirect } from "next/navigation";
|
import { redirect } from "next/navigation";
|
||||||
|
|
||||||
|
|
@ -262,6 +263,17 @@ export default async function MiiPage({ params }: Props) {
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{/* Offscreen metadata image for search engines; hidden from users */}
|
||||||
|
<Image
|
||||||
|
src={`/mii/${mii.id}/image?type=metadata`}
|
||||||
|
alt={`${mii.name}, a ${mii.gender ? mii.gender.toLowerCase() : ""} Mii ${mii.tags.length ? ` with tags: ${mii.tags.join(", ")}` : ""}`}
|
||||||
|
loading="lazy"
|
||||||
|
unoptimized
|
||||||
|
width={1}
|
||||||
|
height={1}
|
||||||
|
className="absolute left-[-999999]"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,6 @@ import Carousel from "../carousel";
|
||||||
import LikeButton from "../like-button";
|
import LikeButton from "../like-button";
|
||||||
import DeleteMiiButton from "../delete-mii";
|
import DeleteMiiButton from "../delete-mii";
|
||||||
import Pagination from "./pagination";
|
import Pagination from "./pagination";
|
||||||
import Image from "next/image";
|
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
searchParams: { [key: string]: string | string[] | undefined };
|
searchParams: { [key: string]: string | string[] | undefined };
|
||||||
|
|
@ -254,17 +253,6 @@ export default async function MiiList({ searchParams, userId, inLikesPage }: Pro
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Offscreen metadata image for search engines; hidden from users */}
|
|
||||||
<Image
|
|
||||||
src={`/mii/${mii.id}/image?type=metadata`}
|
|
||||||
alt={`${mii.name}, a ${mii.gender ? mii.gender.toLowerCase() : ""} Mii ${mii.tags.length ? ` with tags: ${mii.tags.join(", ")}` : ""}`}
|
|
||||||
loading="lazy"
|
|
||||||
unoptimized
|
|
||||||
width={1}
|
|
||||||
height={1}
|
|
||||||
className="absolute left-[-999999]"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue