diff --git a/frontend/firebase.json b/frontend/firebase.json index 5389730bc9e9..4b4bc828ed56 100644 --- a/frontend/firebase.json +++ b/frontend/firebase.json @@ -4,27 +4,7 @@ "ignore": ["firebase.json", "**/.*", "**/node_modules/**"], "rewrites": [ { - "source": "/privacy-policy", - "destination": "/privacy-policy.html" - }, - { - "source": "/terms-of-service", - "destination": "/terms-of-service.html" - }, - { - "source": "/security-policy", - "destination": "/security-policy.html" - }, - { - "source": "/adtest", - "destination": "/adtest.html" - }, - { - "source": "/test", - "destination": "/index.html" - }, - { - "source": "!/@(js|about|challenges|css|fonts|funbox|images|languages|layouts|quotes|sound|themes|webfonts)/**", + "source": "/@(test|settings|account|about|login|profile|friends|account-settings|leaderboards){,/**}", "destination": "/index.html" } ], diff --git a/frontend/src/ts/controllers/page-controller.ts b/frontend/src/ts/controllers/page-controller.ts index 112179c62dd3..7ad64695b2b2 100644 --- a/frontend/src/ts/controllers/page-controller.ts +++ b/frontend/src/ts/controllers/page-controller.ts @@ -26,6 +26,7 @@ type ChangeOptions = { loadingOptions?: LoadingOptions; }; +// NOTE: whenever adding a page add the pathname to the `firebase.json` rewrite rule const pages = { loading: PageLoading.page, test: PageTest.page, diff --git a/frontend/src/ts/utils/json-data.ts b/frontend/src/ts/utils/json-data.ts index 16eba591a7e7..e8e5ab2b207b 100644 --- a/frontend/src/ts/utils/json-data.ts +++ b/frontend/src/ts/utils/json-data.ts @@ -168,7 +168,7 @@ export async function getChallengeList(): Promise { * @returns A promise that resolves to the list of supporters. */ export async function getSupportersList(): Promise { - const data = await cachedFetchJson("/about/supporters.json"); + const data = await cachedFetchJson("/supporters.json"); return data; } @@ -177,7 +177,7 @@ export async function getSupportersList(): Promise { * @returns A promise that resolves to the list of contributors. */ export async function getContributorsList(): Promise { - const data = await cachedFetchJson("/about/contributors.json"); + const data = await cachedFetchJson("/contributors.json"); return data; } diff --git a/frontend/static/about/contributors.json b/frontend/static/contributors.json similarity index 100% rename from frontend/static/about/contributors.json rename to frontend/static/contributors.json diff --git a/frontend/static/about/supporters.json b/frontend/static/supporters.json similarity index 100% rename from frontend/static/about/supporters.json rename to frontend/static/supporters.json