diff --git a/apps/client/src/App.tsx b/apps/client/src/App.tsx index 649dd73..e9ea50c 100644 --- a/apps/client/src/App.tsx +++ b/apps/client/src/App.tsx @@ -2,12 +2,10 @@ import { Route, Routes } from "react-router-dom"; import { Welcome } from "@/pages/welcome"; import SignUpPage from "@/pages/auth/signup"; import LoginPage from "@/pages/auth/login"; -import DashboardLayout from "@/components/layouts/dashboard/dashboard-layout.tsx"; import Home from "@/pages/dashboard/home"; import Page from "@/pages/page/page"; import AccountSettings from "@/pages/settings/account/account-settings"; import WorkspaceMembers from "@/pages/settings/workspace/workspace-members"; -import SettingsLayout from "@/components/layouts/settings/settings-layout.tsx"; import WorkspaceSettings from "@/pages/settings/workspace/workspace-settings"; import Groups from "@/pages/settings/group/groups"; import GroupInfo from "./pages/settings/group/group-info"; @@ -23,6 +21,9 @@ import { authTokensAtom } from "@/features/auth/atoms/auth-tokens-atom.ts"; import { SOCKET_URL } from "@/features/websocket/types"; import AccountPreferences from "@/pages/settings/account/account-preferences.tsx"; import { InviteSignUpForm } from "@/features/auth/components/invite-sign-up-form.tsx"; +import SpaceHome from "@/pages/space/space-home.tsx"; +import PageRedirect from "@/pages/page/page-redirect.tsx"; +import Layout from "@/components/layouts/global/layout.tsx"; export default function App() { const [, setSocket] = useAtom(socketAtom); @@ -63,23 +64,28 @@ export default function App() { } /> } /> - }> + } /> + + }> } /> - } /> + + } /> + } /> + + + } /> + } + /> + } /> + } /> + } /> + } /> + } /> + - }> - } /> - } - /> - } /> - } /> - } /> - } /> - } /> - } /> diff --git a/apps/client/src/components/icons/icon-people-circle.tsx b/apps/client/src/components/icons/icon-people-circle.tsx index 860bf34..9969589 100644 --- a/apps/client/src/components/icons/icon-people-circle.tsx +++ b/apps/client/src/components/icons/icon-people-circle.tsx @@ -2,10 +2,6 @@ import { ActionIcon, rem } from "@mantine/core"; import React from "react"; import { IconUsersGroup } from "@tabler/icons-react"; -interface IconPeopleCircleProps extends React.ComponentPropsWithoutRef<"svg"> { - size?: number | string; -} - export function IconGroupCircle() { return ( diff --git a/apps/client/src/components/layouts/components/breadcrumb.module.css b/apps/client/src/components/layouts/components/breadcrumb.module.css deleted file mode 100644 index 6a58a26..0000000 --- a/apps/client/src/components/layouts/components/breadcrumb.module.css +++ /dev/null @@ -1,6 +0,0 @@ -.breadcrumb { - a { - color: var(--mantine-color-default-color); - text-overflow: ellipsis; - } -} diff --git a/apps/client/src/components/layouts/dashboard/dashboard-layout.tsx b/apps/client/src/components/layouts/dashboard/dashboard-layout.tsx deleted file mode 100644 index 29a297d..0000000 --- a/apps/client/src/components/layouts/dashboard/dashboard-layout.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import { UserProvider } from "@/features/user/user-provider.tsx"; -import Shell from "./shell.tsx"; -import { Outlet } from "react-router-dom"; -import { Helmet } from "react-helmet-async"; - -export default function DashboardLayout() { - return ( - - - - Home - - - - - ); -} diff --git a/apps/client/src/components/layouts/dashboard/shell.module.css b/apps/client/src/components/layouts/dashboard/shell.module.css deleted file mode 100644 index e39067f..0000000 --- a/apps/client/src/components/layouts/dashboard/shell.module.css +++ /dev/null @@ -1,38 +0,0 @@ -.header, -.footer { - @media (max-width: 992px) { - [data-layout="alt"] & { - --_section-right: var(--app-shell-aside-offset, 0px); - } - } -} - -.aside { - background-color: light-dark(var(--mantine-color-gray-0), var(--mantine-color-dark-8)); - - @media (min-width: 993px) { - [data-layout="alt"] & { - --_section-top: var(--_section-top, var(--app-shell-header-offset, 0px)); - --_section-height: var( - --_section-height, - calc( - 100dvh - var(--app-shell-header-offset, 0px) - - var(--app-shell-footer-offset, 0px) - ) - ); - } - } -} - -@media (max-width: 48em) { - .aside { - width: 350px; - } -} - -@media (max-width: 48em) { - .navbar { - width: 300px; - } -} - diff --git a/apps/client/src/components/layouts/dashboard/shell.tsx b/apps/client/src/components/layouts/dashboard/shell.tsx deleted file mode 100644 index a358f1f..0000000 --- a/apps/client/src/components/layouts/dashboard/shell.tsx +++ /dev/null @@ -1,88 +0,0 @@ -import { - asideStateAtom, - desktopSidebarAtom, -} from "@/components/navbar/atoms/sidebar-atom.ts"; -import { useToggleSidebar } from "@/components/navbar/hooks/use-toggle-sidebar.ts"; -import { Navbar } from "@/components/navbar/navbar.tsx"; -import { AppShell, Burger, Group } from "@mantine/core"; -import { useDisclosure } from "@mantine/hooks"; -import { useAtom } from "jotai"; -import classes from "./shell.module.css"; -import Header from "@/components/layouts/dashboard/header.tsx"; -import Breadcrumb from "@/components/layouts/components/breadcrumb.tsx"; -import Aside from "@/components/layouts/dashboard/aside.tsx"; -import { useMatchPath } from "@/hooks/use-match-path.tsx"; -import React from "react"; - -export default function Shell({ children }: { children: React.ReactNode }) { - const [mobileOpened, { toggle: toggleMobile, close: closeMobile }] = - useDisclosure(); - const [desktopOpened] = useAtom(desktopSidebarAtom); - const toggleDesktop = useToggleSidebar(desktopSidebarAtom); - const matchPath = useMatchPath(); - const isPageRoute = matchPath("/p/:pageId"); - const [{ isAsideOpen }] = useAtom(asideStateAtom); - - return ( - - - - - - - - {isPageRoute && } - - - {isPageRoute && ( - -
- - )} - - - - - - - - {children} - - {isPageRoute && ( - -