feat(application): implement Phase 3 strict DTOs, eradicate any types, and add Suspense boundaries
Deploy Canina / deploy (push) Failing after 29s
Deploy Canina / deploy (push) Failing after 29s
This commit is contained in:
1 parent
57596f5aaf
commit
74fcaa6a4e
8 files changed
+82
-24
No files matched your search
@@ -16,6 +16,7 @@ import { useSettingsStore } from "../lib/store/settingsStore";
|
||||
import { useUIStore } from "../lib/store/uiStore";
|
||||
|
||||
import MaintenancePage from "../components/MaintenancePage";
|
||||
import { NavigationTarget } from "../lib/types";
|
||||
|
||||
export default function ClientLayout({ children }: { children: React.ReactNode }) {
|
||||
const isCartOpen = useUIStore((state) => state.isCartOpen);
|
||||
@@ -64,12 +65,12 @@ export default function ClientLayout({ children }: { children: React.ReactNode }
|
||||
if (pathname?.includes("/checkout")) currentView = "checkout";
|
||||
if (pathname?.includes("/dashboard")) currentView = "user-dashboard";
|
||||
|
||||
const handleNavigate = (v: any) => {
|
||||
if (typeof v === 'object') {
|
||||
const handleNavigate = (v: NavigationTarget) => {
|
||||
if (typeof v === 'object' && v !== null) {
|
||||
if (v.view === 'profile') router.push('/profile');
|
||||
if (v.view === 'order-tracking') router.push('/order/tracking');
|
||||
if (v.view === 'home') router.push('/');
|
||||
} else {
|
||||
} else if (typeof v === 'string') {
|
||||
if (v === 'home') router.push('/');
|
||||
else if (v === 'user-dashboard') router.push('/dashboard');
|
||||
else router.push(`/${v}`);
|
||||
|
||||
Reference in new issue
Block a user