Closed L422Y closed 4 months ago
Name | Edit | Preview | Latest Commit |
---|---|---|---|
supabase | Edit on Studio ↗︎ | View Live Preview | f2fe6ffce733bc71a4ab97fa13a12f16582fcda5 |
Visit the deploys page to approve it
Name | Link |
---|---|
Latest commit | f2fe6ffce733bc71a4ab97fa13a12f16582fcda5 |
Thanks @L422Y for the PR
TwoSomenotes though:
I do think that this is too much work for a small advantage on the end user (because when testing the app, he can figure this out quite fast that the page does not exists)
A console warning seemed like a good DX compromise – I've spent about four hours on one project and then two on another trying to figure out where the redirect to "/login" was coming from, so from my experience it's a worthwhile 😅 especially if the values are sourced from the default options.
Tried to find the correct hook for the server endpoints but needed to move on and weighed the odds of someone using a server endpoint versus just using the defaults, and if they were using server endpoints they would be more likely to have configured the redirects / disabled warnings.
Intend(ed) on enhancing this with server endpoints as well.
We could pull some logic from DevTools or my sitemap generator for additional route checking, this pull request was mostly just to get it out of my head and into the real world :)
Add warnings for missing redirect destination(s)
Types of changes
Description
Add warnings for missing redirect destination(s) and
disableWarnings
setting to disable the warnings (for instance if a server endpoint is being used instead of a page)Checklist: