This repository has been archived by the owner on Dec 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2235 from iFixit/add-app-router-troubleshooting-page
Add app router troubleshooting page under feature flags
- Loading branch information
Showing
3 changed files
with
27 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
frontend/app/(defaultLayout)/app-router/Troubleshooting/[device]/[problem]/[wikiid]/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { flags } from '@config/flags'; | ||
import { notFound } from 'next/navigation'; | ||
|
||
interface WikiPageProps { | ||
params: { | ||
device: string; | ||
problem: string; | ||
wikiid: string; | ||
}; | ||
searchParams: { | ||
disableCacheGets?: string | string[] | undefined; | ||
}; | ||
} | ||
|
||
export default async function WikiPage({ params }: WikiPageProps) { | ||
if (!flags.APP_ROUTER_TROUBLESHOOTING_PAGE_ENABLED) notFound(); | ||
|
||
return ( | ||
<div> | ||
WikiPage: <code>{JSON.stringify(params, null, 2)}</code> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
export const flags = { | ||
// STORE_PAGES_APP_ROUTER_ENABLED: | ||
// process.env.NEXT_PUBLIC_FLAG__STORE_PAGES_APP_ROUTER_ENABLED === 'true', | ||
APP_ROUTER_TROUBLESHOOTING_PAGE_ENABLED: | ||
process.env.NEXT_PUBLIC_FLAG__APP_ROUTER_TROUBLESHOOTING_PAGE_ENABLED === | ||
'true', | ||
}; |