GoodDollar / GoodCollective

Monorepo for GoodCollective (Segmented UBI and Direct Payments Pool)
MIT License
5 stars 4 forks source link

[Bug] loading pages outside navigation is broken #146

Closed sirpy closed 9 months ago

sirpy commented 10 months ago

when in an internal page doing page refresh shows a broken page. seems like a navigation framework issue. usually around usage of #

krisbitney commented 10 months ago

@sirpy Can you please provide replication steps?

krisbitney commented 10 months ago

@sirpy How are you serving the app? Since it's a React app, which is a single-page application, you need to serve a catchall route.

// Catch-all route to serve the index.html file
app.get('*', (req, res) => {
  res.sendFile(path.join(__dirname, 'build', 'index.html'));
});

Please make sure your Vercel configuration is correct.

krisbitney commented 10 months ago

The alternative is to use a hash router, which produces unattractive URLs with a # in them.

I am reassigning this issue to @sirpy . You can reassign me if you decide to use hash router.

vldkhh commented 9 months ago

verified