-
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.
refactor(troubleshooting): Add app router page under feature flags
- Loading branch information
Showing
3 changed files
with
28 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
24 changes: 24 additions & 0 deletions
24
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,24 @@ | ||
import { flags } from '@config/flags'; | ||
import { notFound } from 'next/navigation'; | ||
|
||
interface WikiPageProps { | ||
params: { | ||
device: string; | ||
problem: string; | ||
wikiid: string; | ||
}; | ||
searchParams: { | ||
disableCacheGets?: string | string[] | undefined; | ||
variant?: string; | ||
}; | ||
} | ||
|
||
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', | ||
}; |