feat: boards on desktop as on mobile
This commit is contained in:
@ -2,8 +2,7 @@
|
||||
|
||||
import { IconChevronLeft, IconSettings } from "@tabler/icons-react";
|
||||
import { Box, Group, Stack, Text } from "@mantine/core";
|
||||
import Boards from "@/app/deals/components/desktop/Boards/Boards";
|
||||
import BoardsMobile from "@/app/deals/components/mobile/BoardsMobile/BoardsMobile";
|
||||
import Boards from "@/app/deals/components/shared/Boards/Boards";
|
||||
import { useBoardsContext } from "@/app/deals/contexts/BoardsContext";
|
||||
import { useProjectsContext } from "@/app/deals/contexts/ProjectsContext";
|
||||
import ProjectSelect from "@/components/selects/ProjectSelect/ProjectSelect";
|
||||
@ -24,10 +23,9 @@ const Header = () => {
|
||||
return (
|
||||
<Group
|
||||
w={"100%"}
|
||||
justify={"space-between"}
|
||||
justify={"end"}
|
||||
wrap={"nowrap"}
|
||||
pr={"md"}>
|
||||
<Boards />
|
||||
<Group wrap={"nowrap"}>
|
||||
<ColorSchemeToggle />
|
||||
<ProjectSelect
|
||||
@ -42,22 +40,19 @@ const Header = () => {
|
||||
|
||||
const getMobileHeader = () => {
|
||||
return (
|
||||
<Stack gap={0}>
|
||||
<Group justify={"space-between"}>
|
||||
<Box
|
||||
p={"md"}
|
||||
onClick={() => setIsProjectsDrawerOpened(true)}>
|
||||
<IconChevronLeft />
|
||||
</Box>
|
||||
<Text>{selectedProject?.name}</Text>
|
||||
<Box
|
||||
p={"md"}
|
||||
onClick={() => setIsEditorDrawerOpened(true)}>
|
||||
<IconSettings />
|
||||
</Box>
|
||||
</Group>
|
||||
<BoardsMobile />
|
||||
</Stack>
|
||||
<Group justify={"space-between"}>
|
||||
<Box
|
||||
p={"md"}
|
||||
onClick={() => setIsProjectsDrawerOpened(true)}>
|
||||
<IconChevronLeft />
|
||||
</Box>
|
||||
<Text>{selectedProject?.name}</Text>
|
||||
<Box
|
||||
p={"md"}
|
||||
onClick={() => setIsEditorDrawerOpened(true)}>
|
||||
<IconSettings />
|
||||
</Box>
|
||||
</Group>
|
||||
);
|
||||
};
|
||||
|
||||
@ -65,7 +60,12 @@ const Header = () => {
|
||||
<Group
|
||||
justify={"flex-end"}
|
||||
w={"100%"}>
|
||||
{isMobile ? getMobileHeader() : getDesktopHeader()}
|
||||
<Stack
|
||||
gap={0}
|
||||
w={"100%"}>
|
||||
{isMobile ? getMobileHeader() : getDesktopHeader()}
|
||||
<Boards />
|
||||
</Stack>
|
||||
</Group>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user