This commit is contained in:
Philipinho
2023-11-23 15:04:03 +00:00
parent 8238f82c35
commit aeb549add4
4 changed files with 24 additions and 27 deletions

View File

@ -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 CommentList from '@/features/comment/components/comment-list';
import { useAtom } from 'jotai'; import { useAtom } from 'jotai';
import { asideStateAtom } from '@/components/navbar/atoms/sidebar-atom'; import { asideStateAtom } from '@/components/navbar/atoms/sidebar-atom';
import React from 'react'; import React from 'react';
export default function Aside() { export default function Aside() {
const theme = useMantineTheme();
const [{ tab }] = useAtom(asideStateAtom); const [{ tab }] = useAtom(asideStateAtom);
let title; let title;
@ -23,7 +22,7 @@ export default function Aside() {
return ( return (
<Box p="md" bg={theme.colors?.gray[1]}> <Box p="md">
{component && ( {component && (
<> <>
<Text mb="md" fw={500}>{title}</Text> <Text mb="md" fw={500}>{title}</Text>
@ -31,7 +30,6 @@ export default function Aside() {
<ScrollArea style={{ height: '85vh' }} scrollbarSize={5} type="scroll"> <ScrollArea style={{ height: '85vh' }} scrollbarSize={5} type="scroll">
<div style={{ paddingBottom: '200px' }}> <div style={{ paddingBottom: '200px' }}>
{component} {component}
</div> </div>
</ScrollArea> </ScrollArea>
</> </>

View File

@ -1,11 +1,14 @@
@media (max-width: 992px) {
.header, .header,
.footer { .footer {
/* [data-layout='alt'] & { [data-layout='alt'] & {
--_section-right: var(--app-shell-aside-offset, 0px); --_section-right: var(--app-shell-aside-offset, 0px);
} }
*/
}
} }
@media (min-width: 993px) {
.aside { .aside {
background: var(--mantine-color-gray-light); background: var(--mantine-color-gray-light);
@ -18,3 +21,6 @@
} }
} }
}

View File

@ -4,6 +4,3 @@ import { Editor } from '@tiptap/core';
export const editorAtom = atom<Editor | null>(null); export const editorAtom = atom<Editor | null>(null);
export const titleEditorAtom = atom<Editor | null>(null); export const titleEditorAtom = atom<Editor | null>(null);
export type EditorAtomType = typeof editorAtom;
export type TitleEditorAtomType = typeof titleEditorAtom;

View File

@ -1,11 +1,7 @@
import { useAtom } from 'jotai';
import { currentUserAtom } from '@/features/user/atoms/current-user-atom';
import { Container } from '@mantine/core'; import { Container } from '@mantine/core';
import HomeTabs from '@/features/home/components/home-tabs'; import HomeTabs from '@/features/home/components/home-tabs';
// Hello {currentUser && currentUser.user.name}!
export default function Home() { export default function Home() {
const [currentUser] = useAtom(currentUserAtom);
return ( return (
<Container size={'800'} pt="xl"> <Container size={'800'} pt="xl">