Skip to content

Commit

Permalink
Firebase rewrite rules to make address bar work
Browse files Browse the repository at this point in the history
  • Loading branch information
alexristinmaa committed Nov 13, 2024
1 parent 5256f7b commit b2f5dcb
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// styles
import { PageProps } from '@/.next/types/app/(experiments)/layout';
import './markdown.css';

// other
Expand All @@ -20,7 +21,7 @@ export function generateStaticParams() {

// Multiple versions of this page will be statically generated
// using the `params` returned by `generateStaticParams`
export default async function Page({ params } : { params: { experiment: string } }) {
export default async function Page({ params } : { params: { experiment: string } } & PageProps) {
const { experiment } = params;
const markdownString = fs.readFileSync(`./app/(experiments)/${experiment}/page.md`, 'utf8');

Expand Down
25 changes: 20 additions & 5 deletions alexanderristinmaa/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"compilerOptions": {
"lib": ["dom", "dom.iterable", "esnext"],
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
Expand All @@ -18,9 +22,20 @@
}
],
"paths": {
"@/*": ["./*"]
}
"@/*": [
"./*"
]
},
"target": "ES2017"
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", "app/hemligt/catimation.ts"],
"exclude": ["node_modules"]
"include": [
"next-env.d.ts",
"**/*.ts",
"**/*.tsx",
".next/types/**/*.ts",
"app/hemligt/catimation.ts"
],
"exclude": [
"node_modules"
]
}
8 changes: 4 additions & 4 deletions firebase.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
"**/node_modules/**"
],
"rewrites": [
{
"source": "**",
"destination": "index.html"
}
{
"source": "**",
"destination": "[...params].html"
}
]
},
"emulators": {
Expand Down

0 comments on commit b2f5dcb

Please sign in to comment.