Skip to content

Commit

Permalink
be more explicit about ssr and prerender
Browse files Browse the repository at this point in the history
  • Loading branch information
jakmeier committed Oct 2, 2024
1 parent 7edc09d commit 611fbf2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bouncy_frontend/src/routes/+layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ import {
} from '$lib/instructor/bouncy_instructor';

// This is the root layout, hence it defines prerendering for the entire app default.
// Translations act weird with prerender on, so I'm disabling it.
export const prerender = false;
export const ssr = true;
export const trailingSlash = 'always';

let loadedOnce = false;
Expand Down
5 changes: 5 additions & 0 deletions bouncy_frontend/src/routes/profile/+page.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import { fetchLeaderboard } from '$lib/stats';

// fetchLeaderboard doesn't work on SSR.
export const ssr = false;
// Profile of a user should not be prerendered
export const prerender = false;

export async function load() {
return {
leaderboard: await fetchLeaderboard()
Expand Down

0 comments on commit 611fbf2

Please sign in to comment.