feat(seo): heading structure + SSR person profile
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9b64f137f1
commit
cd34f4eb5f
9 files changed
+30
-7
No files matched your search
@@ -11,7 +11,12 @@ export const metadata: Metadata = {
|
||||
};
|
||||
|
||||
const Favorites = () => {
|
||||
return <UsersList list='favorite' label='favorites' />;
|
||||
return (
|
||||
<>
|
||||
<h1 className='sr-only'>My Favorite Shows</h1>
|
||||
<UsersList list='favorite' label='favorites' />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default Favorites;
|
||||
@@ -11,7 +11,12 @@ export const metadata: Metadata = {
|
||||
};
|
||||
|
||||
const WatchList = async () => {
|
||||
return <UsersList list='watchlist' label='watchlist' />;
|
||||
return (
|
||||
<>
|
||||
<h1 className='sr-only'>My Watchlist</h1>
|
||||
<UsersList list='watchlist' label='watchlist' />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default WatchList;
|
||||
@@ -2,6 +2,7 @@ import { dehydrate, HydrationBoundary } from '@tanstack/react-query';
|
||||
import { Metadata } from 'next';
|
||||
|
||||
import randomQuery, { generatePage } from '@/data/queries/random';
|
||||
import { TITLE } from '@/env';
|
||||
import getQueryClient from '@/lib/queryClient';
|
||||
|
||||
import Container from './container';
|
||||
@@ -19,6 +20,7 @@ const Random = async () => {
|
||||
|
||||
return (
|
||||
<HydrationBoundary state={dehydrate(queryClient)}>
|
||||
<h1 className='sr-only'>{TITLE} — Discover Your Next Favorite Movie</h1>
|
||||
<Container page={page} />
|
||||
</HydrationBoundary>
|
||||
);
|
||||
|
||||
@@ -12,6 +12,7 @@ const Container: FC<Props> = ({ showId, showType }) => (
|
||||
<div className='flex flex-1 flex-col'>
|
||||
<div className='xs:mb-4'>
|
||||
<Preview
|
||||
heading
|
||||
showId={showId}
|
||||
showType={showType}
|
||||
className='rounded-lg bg-background'
|
||||
|
||||
@@ -41,7 +41,11 @@ export const generateMetadata = async ({ params: { id } }: Props): Promise<Metad
|
||||
const PersonPage: FC<Props> = async ({ params: { id } }) => {
|
||||
const queryClient = getQueryClient();
|
||||
|
||||
queryClient.prefetchQuery(personQuery({ personId: id }));
|
||||
try {
|
||||
await queryClient.fetchQuery(personQuery({ personId: id }));
|
||||
} catch (_) {
|
||||
return notFound();
|
||||
}
|
||||
|
||||
return (
|
||||
<HydrationBoundary state={dehydrate(queryClient)}>
|
||||
|
||||
@@ -20,6 +20,7 @@ const Popular = async () => {
|
||||
|
||||
return (
|
||||
<HydrationBoundary state={dehydrate(queryClient)}>
|
||||
<h1 className='sr-only'>Popular Movies</h1>
|
||||
<Container />
|
||||
</HydrationBoundary>
|
||||
);
|
||||
|
||||
@@ -20,6 +20,7 @@ const Top = async () => {
|
||||
|
||||
return (
|
||||
<HydrationBoundary state={dehydrate(queryClient)}>
|
||||
<h1 className='sr-only'>Top Rated Movies</h1>
|
||||
<Container />
|
||||
</HydrationBoundary>
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user