fix: SITE_URL

This commit is contained in:
ner committed 2024-10-28 17:20:05 +02:00
1 parent 1fe912f4bd
commit dfdfb79169
66 files changed
+1352 -240

No files matched your search

-5
View File
@@ -1,5 +0,0 @@
import UsersList from '@/components/UsersLists';
const Container = () => <UsersList list='favorite' label='favorites' />;
export default Container;
+12 -10
View File
@@ -1,29 +1,31 @@
import { dehydrate, HydrationBoundary } from '@tanstack/react-query';
import { Metadata } from 'next';
import { session } from '@/api';
import usersShowsQuery from '@/api/queries/usersShows';
import UsersList from '@/components/UsersLists';
import { session as getSession } from '@/data';
import usersShowsQuery from '@/data/queries/usersShows';
import { TITLE } from '@/env';
import getQueryClient from '@/lib/queryClient';
import Container from './container';
export const metadata: Metadata = {
title: 'My Favorite Shows - Movie Advisor',
description:
'View your favorite shows on Movie Advisor. Keep track of films you’ve added and revisit your top picks anytime.'
title: `My Favorite Shows - ${TITLE}`,
description: `View your favorite shows on ${TITLE}. Keep track of films you’ve added and revisit your top picks anytime.`
};
const Favorites = () => {
const Favorites = async () => {
const session = await getSession();
const queryClient = getQueryClient();
const list = 'favorite';
const showType = 'movie';
queryClient.prefetchInfiniteQuery(usersShowsQuery({ showType, list, session: session() }));
if (session) {
await queryClient.prefetchInfiniteQuery(usersShowsQuery({ showType, list, session }));
}
return (
<HydrationBoundary state={dehydrate(queryClient)}>
<Container />
<UsersList session={session} list={list} label='favorites' />
</HydrationBoundary>
);
};
+3 -3
View File
@@ -1,14 +1,14 @@
import { dehydrate, HydrationBoundary } from '@tanstack/react-query';
import randomQuery from '@/api/queries/random';
import randomQuery from '@/data/queries/random';
import getQueryClient from '@/lib/queryClient';
import Container from './container';
const Random = () => {
const Random = async () => {
const queryClient = getQueryClient();
queryClient.prefetchInfiniteQuery(randomQuery());
await queryClient.prefetchInfiniteQuery(randomQuery());
return (
<HydrationBoundary state={dehydrate(queryClient)}>
+6 -6
View File
@@ -1,21 +1,21 @@
import { dehydrate, HydrationBoundary } from '@tanstack/react-query';
import { Metadata } from 'next';
import popularQuery from '@/api/queries/popular';
import popularQuery from '@/data/queries/popular';
import { TITLE } from '@/env';
import getQueryClient from '@/lib/queryClient';
import Container from './container';
export const metadata: Metadata = {
title: 'Popular Movies | Movie Advisor',
description:
'Check out the most popular movies right now on Movie Advisor. See what’s trending and don’t miss out on the latest hits.'
title: `Popular Movies | ${TITLE}`,
description: `Check out the most popular movies right now on ${TITLE}. See what’s trending and don’t miss out on the latest hits.`
};
const Popular = () => {
const Popular = async () => {
const queryClient = getQueryClient();
queryClient.prefetchInfiniteQuery(popularQuery());
await queryClient.prefetchInfiniteQuery(popularQuery());
return (
<HydrationBoundary state={dehydrate(queryClient)}>
+1 -1
View File
@@ -1,6 +1,6 @@
'use client';
import popularQuery from '@/api/queries/popular';
import popularQuery from '@/data/queries/popular';
import useInfiniteList from '@/hooks/useInfiniteList';
const usePopular = () => useInfiniteList(popularQuery());
+3 -3
View File
@@ -1,16 +1,16 @@
import { dehydrate, HydrationBoundary } from '@tanstack/react-query';
import similarQuery from '@/api/queries/similar';
import similarQuery from '@/data/queries/similar';
import getQueryClient from '@/lib/queryClient';
import Container from './container';
const Similar = ({ searchParams }: { searchParams: Record<string, string> }) => {
const Similar = async ({ searchParams }: { searchParams: Record<string, string> }) => {
const queryClient = getQueryClient();
const { id, type } = searchParams || {};
queryClient.prefetchInfiniteQuery(similarQuery({ showId: id, showType: type as Show['type'] }));
await queryClient.prefetchInfiniteQuery(similarQuery({ showId: id, showType: type as Show['type'] }));
return (
<HydrationBoundary state={dehydrate(queryClient)}>
+1 -1
View File
@@ -1,6 +1,6 @@
'use client';
import similarQuery from '@/api/queries/similar';
import similarQuery from '@/data/queries/similar';
import useInfiniteList from '@/hooks/useInfiniteList';
interface Props {
+3 -3
View File
@@ -1,16 +1,16 @@
import { dehydrate, HydrationBoundary } from '@tanstack/react-query';
import popularQuery from '@/api/queries/popular';
import popularQuery from '@/data/queries/popular';
import getQueryClient from '@/lib/queryClient';
import Container from './container';
const Starring = ({ searchParams }: { searchParams: Record<string, string> }) => {
const Starring = async ({ searchParams }: { searchParams: Record<string, string> }) => {
const queryClient = getQueryClient();
const { actorId } = searchParams || {};
queryClient.prefetchInfiniteQuery(popularQuery({ sortBy: 'vote_average.desc', starring: actorId }));
await queryClient.prefetchInfiniteQuery(popularQuery({ sortBy: 'vote_average.desc', starring: actorId }));
return (
<HydrationBoundary state={dehydrate(queryClient)}>
+1 -1
View File
@@ -1,6 +1,6 @@
'use client';
import popularQuery from '@/api/queries/popular';
import popularQuery from '@/data/queries/popular';
import useInfiniteList from '@/hooks/useInfiniteList';
const useStarring = ({ actorId }: { actorId?: string }) =>
+6 -6
View File
@@ -1,21 +1,21 @@
import { dehydrate, HydrationBoundary } from '@tanstack/react-query';
import { Metadata } from 'next';
import popularQuery from '@/api/queries/popular';
import popularQuery from '@/data/queries/popular';
import { TITLE } from '@/env';
import getQueryClient from '@/lib/queryClient';
import Container from './container';
export const metadata: Metadata = {
title: 'Top Rated Movies | Movie Advisor',
description:
'Discover the top-rated movies on Movie Advisor. Find the highest-rated films and make informed viewing choices.'
title: `Top Rated Movies | ${TITLE}`,
description: `Discover the top-rated movies on ${TITLE}. Find the highest-rated films and make informed viewing choices.`
};
const Top = () => {
const Top = async () => {
const queryClient = getQueryClient();
queryClient.prefetchInfiniteQuery(popularQuery({ sortBy: 'vote_average.desc' }));
await queryClient.prefetchInfiniteQuery(popularQuery({ sortBy: 'vote_average.desc' }));
return (
<HydrationBoundary state={dehydrate(queryClient)}>
+1 -1
View File
@@ -1,6 +1,6 @@
'use client';
import popularQuery from '@/api/queries/popular';
import popularQuery from '@/data/queries/popular';
import useInfiniteList from '@/hooks/useInfiniteList';
const useTop = () => useInfiniteList(popularQuery({ sortBy: 'vote_average.desc' }));
-5
View File
@@ -1,5 +0,0 @@
import UsersList from '@/components/UsersLists';
const Container = () => <UsersList list='watchlist' label='watch' />;
export default Container;
+12 -10
View File
@@ -1,29 +1,31 @@
import { dehydrate, HydrationBoundary } from '@tanstack/react-query';
import { Metadata } from 'next';
import { session } from '@/api';
import usersShowsQuery from '@/api/queries/usersShows';
import UsersList from '@/components/UsersLists';
import { session as getSession } from '@/data';
import usersShowsQuery from '@/data/queries/usersShows';
import { TITLE } from '@/env';
import getQueryClient from '@/lib/queryClient';
import Container from './container';
export const metadata: Metadata = {
title: 'My watch list - Movie Advisor',
description:
'View your favorite shows on Movie Advisor. Keep track of films you’ve added and revisit your top picks anytime.'
title: `My watch list - ${TITLE}`,
description: `View your favorite shows on ${TITLE}. Keep track of films you’ve added and revisit your top picks anytime.`
};
const WatchList = () => {
const WatchList = async () => {
const session = await getSession();
const queryClient = getQueryClient();
const list = 'watchlist';
const showType = 'movie';
queryClient.prefetchInfiniteQuery(usersShowsQuery({ showType, list, session: session() }));
if (session) {
await queryClient.prefetchInfiniteQuery(usersShowsQuery({ showType, list, session }));
}
return (
<HydrationBoundary state={dehydrate(queryClient)}>
<Container />
<UsersList session={session} list={list} label='watch' />
</HydrationBoundary>
);
};