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 { 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 (
<Box p="md" bg={theme.colors?.gray[1]}>
<Box p="md">
{component && (
<>
<Text mb="md" fw={500}>{title}</Text>
@ -31,7 +30,6 @@ export default function Aside() {
<ScrollArea style={{ height: '85vh' }} scrollbarSize={5} type="scroll">
<div style={{ paddingBottom: '200px' }}>
{component}
</div>
</ScrollArea>
</>

View File

@ -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))
);
}
}
}

View File

@ -4,6 +4,3 @@ import { Editor } from '@tiptap/core';
export const editorAtom = 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 HomeTabs from '@/features/home/components/home-tabs';
// Hello {currentUser && currentUser.user.name}!
export default function Home() {
const [currentUser] = useAtom(currentUserAtom);
return (
<Container size={'800'} pt="xl">