feat: implement web URL constants and enhance navigation handling

- Introduced a centralized `WEB_URL` constant for managing application routes, improving maintainability and readability across components.
- Updated various components, including login, auth, and main app modules, to utilize the new `WEB_URL` constants for navigation, ensuring consistency in route management.
- Added a new `AppHomeRedirect` component to streamline user redirection based on privileges, enhancing user experience.
- Implemented client-side navigation functions to prevent full page reloads, improving performance and user interaction.
- Added tests for new functionalities, ensuring reliability in navigation and URL handling.

These changes significantly enhance the application's routing structure and navigation efficiency, providing a more cohesive user experience.
This commit is contained in:
shancheas
2026-09-02 11:17:51 +07:00
parent f5c1b7430a
commit b0090bc15f
18 changed files with 345 additions and 24 deletions
@@ -1,5 +1,6 @@
import { StatusPage } from '@repo/ui/components';
import { useTranslation } from '@repo/core-i18n';
import { WEB_URL } from '../constants/web-url';
interface ComingSoonPageProps {
/** Use inside ModuleLayout so the page fits under the app chrome */
@@ -16,7 +17,7 @@ export function ComingSoonPage({ embedded = false }: ComingSoonPageProps) {
description={t('common:systemPages.comingSoon.description')}
showActionsBack={!embedded}
showActionsHome
homeUrl="/app"
homeUrl={WEB_URL.APP}
backButtonLabel={t('common:systemPages.actions.goBack')}
homeButtonLabel={t('common:systemPages.actions.backToHome')}
height={embedded ? 500 : undefined}