kopia lustrzana https://github.com/bugout-dev/moonstream
sidebar roughly saying works
rodzic
3860e1be4c
commit
16b1e54c9c
|
@ -17,10 +17,12 @@ import {
|
||||||
ArrowRightIcon,
|
ArrowRightIcon,
|
||||||
LockIcon,
|
LockIcon,
|
||||||
} from "@chakra-ui/icons";
|
} from "@chakra-ui/icons";
|
||||||
import { MdTimeline, MdSettings } from "react-icons/md";
|
import { MdSettings, MdDashboard } from "react-icons/md";
|
||||||
import { HiAcademicCap } from "react-icons/hi";
|
import { HiAcademicCap } from "react-icons/hi";
|
||||||
import { WHITE_LOGO_W_TEXT_URL, ALL_NAV_PATHES } from "../core/constants";
|
import { WHITE_LOGO_W_TEXT_URL, ALL_NAV_PATHES } from "../core/constants";
|
||||||
import { v4 } from "uuid";
|
import { v4 } from "uuid";
|
||||||
|
import useDashboard from "../core/hooks/useDashboard";
|
||||||
|
import { MODAL_TYPES } from "../core/providers/OverlayProvider/constants";
|
||||||
|
|
||||||
const Sidebar = () => {
|
const Sidebar = () => {
|
||||||
const ui = useContext(UIContext);
|
const ui = useContext(UIContext);
|
||||||
|
@ -56,6 +58,7 @@ const Sidebar = () => {
|
||||||
: ui.setSidebarCollapsed(!ui.sidebarCollapsed);
|
: ui.setSidebarCollapsed(!ui.sidebarCollapsed);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
<RouterLink href="/" passHref>
|
||||||
<Image
|
<Image
|
||||||
// h="full"
|
// h="full"
|
||||||
// maxH="100%"
|
// maxH="100%"
|
||||||
|
@ -63,17 +66,26 @@ const Sidebar = () => {
|
||||||
py="0.75rem"
|
py="0.75rem"
|
||||||
pl={5}
|
pl={5}
|
||||||
src={WHITE_LOGO_W_TEXT_URL}
|
src={WHITE_LOGO_W_TEXT_URL}
|
||||||
alt="bugout.dev"
|
alt="Moonstream To"
|
||||||
/>
|
/>
|
||||||
|
</RouterLink>
|
||||||
</Flex>
|
</Flex>
|
||||||
</SidebarHeader>
|
</SidebarHeader>
|
||||||
{ui.isLoggedIn && (
|
{ui.isLoggedIn && (
|
||||||
<SidebarContent>
|
<SidebarContent>
|
||||||
<Menu iconShape="square">
|
<Menu iconShape="square">
|
||||||
<MenuItem icon={<MdTimeline />}>
|
{dashboardsListCache.data &&
|
||||||
{" "}
|
dashboardsListCache.data.data.resources.map((dashboard) => {
|
||||||
<RouterLink href="/stream">Stream</RouterLink>
|
console.log("dashboard", dashboard);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<MenuItem icon={<MdDashboard />} key={v4()}>
|
||||||
|
<RouterLink href={`/dashboard/${dashboard?.id}`}>
|
||||||
|
{dashboard.resource_data.name}
|
||||||
|
</RouterLink>
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
|
);
|
||||||
|
})}
|
||||||
</Menu>
|
</Menu>
|
||||||
{ui.isMobileView && (
|
{ui.isMobileView && (
|
||||||
<Menu iconShape="square">
|
<Menu iconShape="square">
|
||||||
|
|
Ładowanie…
Reference in New Issue