mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-28 09:33:46 +00:00
fix(auth): make login footer legal links open real pages, not the login tab
The login-page footer linked to /offer, /privacy and /recurrent-payments with target=_blank, but none of those routes existed, so opening them hit the SPA catch-all, which redirects unauthenticated users to /login — every footer link just opened another login tab. - Add a public PublicLegal page that fetches the offer / privacy document from the existing public /cabinet/info endpoints and renders sanitized HTML (DOMPurify via the shared formatContent helper). - Register public /offer and /privacy routes. - Extract sanitizeHtml/formatContent into src/utils/legalContent.ts and reuse from Info.tsx (was duplicated). - Drop the /recurrent-payments footer link: there is no recurring-payments legal document or endpoint in the backend, so it had no real destination. Re-add once such a document exists. type-check, eslint, prettier and build all pass.
This commit is contained in:
@@ -4779,6 +4779,7 @@
|
||||
"loyalty": "Loyalty",
|
||||
"noFaq": "No FAQ available",
|
||||
"noContent": "No content available",
|
||||
"documentUnavailable": "This document is not available yet.",
|
||||
"updatedAt": "Updated",
|
||||
"noLoyaltyTiers": "Loyalty program is not available yet",
|
||||
"yourProgress": "Your Progress",
|
||||
|
||||
Reference in New Issue
Block a user