make urls look less awful (remove query params)
All checks were successful
deploy / deploy (push) Successful in 53s

This commit is contained in:
Lee
2023-10-24 12:56:28 +01:00
parent 3e10b0108b
commit 171dfd9cc0
12 changed files with 47 additions and 84 deletions

View File

@ -0,0 +1,9 @@
import GlobalRanking from "@/components/player/GlobalRanking";
type Props = {
params: { page: string; country: string };
};
export default function RankingGlobal({ params: { page, country } }: Props) {
return <GlobalRanking page={Number(page)} country={country} />;
}

View File

@ -1,14 +0,0 @@
import GlobalRanking from "@/components/player/GlobalRanking";
import { getPageFromSearchQuery } from "@/utils/utils";
import { headers } from "next/headers";
type RankingCountryProps = {
params: { country: string };
};
export default function RankingCountry({ params }: RankingCountryProps) {
const page = getPageFromSearchQuery(headers());
const country = params.country;
return <GlobalRanking page={page} country={country} />;
}

View File

@ -0,0 +1,9 @@
import GlobalRanking from "@/components/player/GlobalRanking";
type Props = {
params: { page: string };
};
export default function RankingGlobal({ params: { page } }: Props) {
return <GlobalRanking page={Number(page)} />;
}

View File

@ -1,9 +0,0 @@
import GlobalRanking from "@/components/player/GlobalRanking";
import { getPageFromSearchQuery } from "@/utils/utils";
import { headers } from "next/headers";
export default function RankingGlobal() {
const page = getPageFromSearchQuery(headers());
return <GlobalRanking page={page} />;
}