chore: upgrade dependencies, restructure shared libs, and fix UI

- Upgrade Nx 22.1.1 → 22.6.3 and all patch/minor dependencies
- Restructure shared libs: move business logic from utils to service
- Consolidate shadcn-ui into ui lib with atomic design pattern
- Fix container centering for landing app (Tailwind v4 compatibility)
- Fix button styling by updating @source directive in globals.css
- Fix SiCss3 → SiCss rename in react-icons 5.6
- Fix duplicate useSession export conflict
- Remove dead code, comments, and unused files

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
maulanasdqn
2026-03-31 01:44:17 +07:00
co-authored by Claude Opus 4.6
parent f68d97188c
commit 3f4461c65c
231 changed files with 6062 additions and 39166 deletions
-9
View File
@@ -9,7 +9,6 @@ import { useAuthStore } from './features/auth/store/auth.store';
import { Sidebar } from '../components/Sidebar';
import { MenuOutlined } from '@ant-design/icons';
// Helper to determine route types
const isPublicRoute = (pathname: string) => {
return pathname.startsWith('/auth') || pathname === '/auth/callback';
};
@@ -21,22 +20,16 @@ export default function RootLayout() {
const [mobileSidebarOpen, setMobileSidebarOpen] = useState(false);
useEffect(() => {
// If we're on a public route, no auth check needed
if (isPublicRoute(location.pathname)) {
return;
}
// AUTH CHECK
if (!isAuthenticated) {
// No session -> Redirect to login
navigate('/auth/login', { replace: true });
return;
}
}, [location.pathname, navigate, isAuthenticated]);
// RENDER LOGIC
// 1. Public Pages (Full Layout Control)
if (isPublicRoute(location.pathname)) {
return (
<>
@@ -46,7 +39,6 @@ export default function RootLayout() {
);
}
// 2. Protected Pages
if (!isAuthenticated) {
return null;
}
@@ -59,7 +51,6 @@ export default function RootLayout() {
/>
<div className="flex-1 flex flex-col min-w-0 overflow-hidden">
{/* Mobile Header */}
<header className="lg:hidden bg-white border-b border-gray-200 px-4 py-3 flex items-center justify-between sticky top-0 z-30">
<div className="flex items-center gap-3">
<button