From 66277d6c3bf6ee1ff8329253983c2f1bf23c3c66 Mon Sep 17 00:00:00 2001 From: Wahyu Kurniawan Date: Wed, 28 Feb 2024 08:30:20 +0700 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20refactor:=20move=20sidebar?= =?UTF-8?q?=20inside=20shared=20components?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{ => shared/Sidebar}/Sidebar.tsx | 48 +++++++++---------- .../src/components/shared/Sidebar/index.ts | 1 + 2 files changed, 25 insertions(+), 24 deletions(-) rename packages/frontend/src/components/{ => shared/Sidebar}/Sidebar.tsx (80%) create mode 100644 packages/frontend/src/components/shared/Sidebar/index.ts diff --git a/packages/frontend/src/components/Sidebar.tsx b/packages/frontend/src/components/shared/Sidebar/Sidebar.tsx similarity index 80% rename from packages/frontend/src/components/Sidebar.tsx rename to packages/frontend/src/components/shared/Sidebar/Sidebar.tsx index 1c679971..91db3539 100644 --- a/packages/frontend/src/components/Sidebar.tsx +++ b/packages/frontend/src/components/shared/Sidebar/Sidebar.tsx @@ -5,8 +5,8 @@ import { Organization } from 'gql-client'; import { Option } from '@material-tailwind/react'; import { useDisconnect } from 'wagmi'; -import { useGQLClient } from '../context/GQLClientContext'; -import AsyncSelect from './shared/AsyncSelect'; +import { useGQLClient } from 'context/GQLClientContext'; +import AsyncSelect from 'components/shared/AsyncSelect'; import { ChevronGrabberHorizontal, FolderIcon, @@ -14,10 +14,11 @@ import { LifeBuoyIcon, QuestionMarkRoundIcon, SettingsSlidersIcon, -} from './shared/CustomIcon'; +} from 'components/shared/CustomIcon'; import { Tabs } from 'components/shared/Tabs'; +import { Heading } from 'components/shared/Heading'; -const Sidebar = () => { +export const Sidebar = () => { const { orgSlug } = useParams(); const navigate = useNavigate(); const client = useGQLClient(); @@ -42,20 +43,20 @@ const Sidebar = () => { }, [disconnect, navigate]); return ( -
-
- -
- Snowball Logo - - Snowball - -
- +
+ {/* Logo */} + +
+ Snowball Logo + Snowball +
+ + {/* Switch organization */} +
{ )} arrow={} > - {/* TODO: Show label organization and manage in option */} + {/* // TODO: Show label organization and manage in option */} {organizations.map((org) => (