Closed fayez-nazzal closed 1 year ago
Approving the new route. Once we finish implementing it, can we make it the default route? e..g
/compact
becomes/
and we serve the current layout under/bymasjid
or anything more creative. My main goal is that the user finds an answer to the wwpray question on the home page without any scrolling.
I think '/masjids' would be good, then we have a switch or tabs to group by masjids
or prayers
.
This PR is the next step for adding the compact layout. After this, we can start with the component implementation
The following changes are made:
+page.server.ts
to+layout.ts
, for our case, this is better than+layout.server.ts
because we need searchParams logic to be run in the browser (this will be mostly the same as we use static generation).masjidsListElement
(global variable), which makes it easier to read across the app./compact
route.What's the deal?
We are building
wwpray
to work when JS is disabled, so we decided to put the compact layout on its own route. This way, a link to that page will normally work without JS, but we also need to ensure that the code is clean and not repeated. Using SvelteKit's layouts works well in this case.