Skip to content
This repository has been archived by the owner on Dec 19, 2024. It is now read-only.

Commit

Permalink
Merge pull request #2235 from iFixit/add-app-router-troubleshooting-page
Browse files Browse the repository at this point in the history
Add app router troubleshooting page under feature flags
  • Loading branch information
danielbeardsley authored Feb 9, 2024
2 parents acf4bb1 + 31a915d commit a469d7c
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 3 deletions.
2 changes: 1 addition & 1 deletion frontend/.env.development
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ NEXT_PUBLIC_ALGOLIA_PRODUCT_INDEX_NAME=dev_product_group_en
NEXT_PUBLIC_DEFAULT_STORE_CODE=test

# Flags
# NEXT_PUBLIC_FLAG__STORE_PAGES_APP_ROUTER_ENABLED=true
NEXT_PUBLIC_FLAG__APP_ROUTER_TROUBLESHOOTING_PAGE_ENABLED=true
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>
);
}
5 changes: 3 additions & 2 deletions frontend/config/flags.ts
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',
};

0 comments on commit a469d7c

Please sign in to comment.