From aeb549add430c254e9dae9613601611cb83d426f Mon Sep 17 00:00:00 2001 From: Philipinho <16838612+Philipinho@users.noreply.github.com> Date: Thu, 23 Nov 2023 15:04:03 +0000 Subject: [PATCH] cleanups --- client/src/components/aside/aside.tsx | 6 +-- .../src/components/layouts/shell.module.css | 38 +++++++++++-------- .../src/features/editor/atoms/editorAtom.ts | 3 -- client/src/pages/dashboard/home.tsx | 4 -- 4 files changed, 24 insertions(+), 27 deletions(-) diff --git a/client/src/components/aside/aside.tsx b/client/src/components/aside/aside.tsx index 04c3d1ae..007ff854 100644 --- a/client/src/components/aside/aside.tsx +++ b/client/src/components/aside/aside.tsx @@ -1,11 +1,10 @@ -import { Box, ScrollArea, Text, useMantineTheme } from '@mantine/core'; +import { Box, ScrollArea, Text } from '@mantine/core'; import CommentList from '@/features/comment/components/comment-list'; import { useAtom } from 'jotai'; import { asideStateAtom } from '@/components/navbar/atoms/sidebar-atom'; import React from 'react'; export default function Aside() { - const theme = useMantineTheme(); const [{ tab }] = useAtom(asideStateAtom); let title; @@ -23,7 +22,7 @@ export default function Aside() { return ( - + {component && ( <> {title} @@ -31,7 +30,6 @@ export default function Aside() {
{component} -
diff --git a/client/src/components/layouts/shell.module.css b/client/src/components/layouts/shell.module.css index bd3fd558..f48f7422 100644 --- a/client/src/components/layouts/shell.module.css +++ b/client/src/components/layouts/shell.module.css @@ -1,20 +1,26 @@ -.header, -.footer { - /* [data-layout='alt'] & { - --_section-right: var(--app-shell-aside-offset, 0px); - } - */ -} +@media (max-width: 992px) { + .header, + .footer { + [data-layout='alt'] & { + --_section-right: var(--app-shell-aside-offset, 0px); + } -.aside { - background: var(--mantine-color-gray-light); - - [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 (min-width: 993px) { + .aside { + background: var(--mantine-color-gray-light); + + [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)) + ); + } + } + +} + + diff --git a/client/src/features/editor/atoms/editorAtom.ts b/client/src/features/editor/atoms/editorAtom.ts index aea9c716..1d168110 100644 --- a/client/src/features/editor/atoms/editorAtom.ts +++ b/client/src/features/editor/atoms/editorAtom.ts @@ -4,6 +4,3 @@ import { Editor } from '@tiptap/core'; export const editorAtom = atom(null); export const titleEditorAtom = atom(null); - -export type EditorAtomType = typeof editorAtom; -export type TitleEditorAtomType = typeof titleEditorAtom; diff --git a/client/src/pages/dashboard/home.tsx b/client/src/pages/dashboard/home.tsx index a6ffea81..9ff18542 100644 --- a/client/src/pages/dashboard/home.tsx +++ b/client/src/pages/dashboard/home.tsx @@ -1,11 +1,7 @@ -import { useAtom } from 'jotai'; -import { currentUserAtom } from '@/features/user/atoms/current-user-atom'; import { Container } from '@mantine/core'; import HomeTabs from '@/features/home/components/home-tabs'; -// Hello {currentUser && currentUser.user.name}! export default function Home() { - const [currentUser] = useAtom(currentUserAtom); return (