Skip to content

Commit ef8b133

Browse files
committed
feat(nin): if no path, fetch en-gb site
1 parent 77c6083 commit ef8b133

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

pages/[[...params]].js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,14 @@ export async function getServerSideProps({ req, res, query }) {
6060

6161
const path = query.params?.join("/") || "";
6262

63-
const actualUrl = `https://${baseUrl}/${path}`;
63+
let actualUrl = `https://${baseUrl}/${path}`;
64+
65+
// nintendo.uk.net specific: if fetching the root path, fall back to en-gb
66+
if (actualUrl === "https://nintendo.com/" || actualUrl === "https://www.nintendo.com/") {
67+
actualUrl = "https://www.nintendo.com/en-gb/";
68+
}
69+
70+
console.log(`\n${actualUrl}`);
6471

6572
// we check if the user has been rickrolled on this page before
6673
const rickrolled = Boolean(

0 commit comments

Comments
 (0)