Skip to content

Commit

Permalink
πŸŽˆπŸ’Έ ↝ Add new lib file for creating posts
Browse files Browse the repository at this point in the history
  • Loading branch information
Gizmotronn committed Jan 5, 2023
1 parent 984c3b1 commit 286700a
Show file tree
Hide file tree
Showing 13 changed files with 1,484 additions and 75 deletions.
24 changes: 19 additions & 5 deletions Server/frontend/components/Navigation/Sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,23 @@ import {
} from 'react-icons/fi';
import { IoPawOutline } from 'react-icons/io5';
import NavItem from './NavItem';
import Link from 'next/link';

// Getting user data for sidebar
import { useAddress, useNetworkMismatch, useNetwork, ConnectWallet, ChainId, MediaRenderer } from '@thirdweb-dev/react';
import useLensUser from '../../lib/auth/useLensUser';
import useLogin from '../../lib/auth/useLogin';
import SignInButton from '../SignInButton';

export default function Sidebar() {
const [navSize, changeNavSize] = useState("large")
const address = useAddress(); // Detect connected wallet
const isOnWrongNetwork = useNetworkMismatch(); // Is different to `activeChainId` in `_app.tsx`
const [, switchNetwork] = useNetwork(); // Switch network to `activeChainId`
const { isSignedInQuery, profileQuery } = useLensUser();
const { mutate: requestLogin } = useLogin();

const [navSize, changeNavSize] = useState("small");

return (
<Flex
pos="sticky"
Expand Down Expand Up @@ -53,9 +67,9 @@ export default function Sidebar() {
changeNavSize("small")
}}
/>
<NavItem navSize={navSize} icon={FiHome} title="Dashboard" description="This is the description for the dashboard." />
<NavItem navSize={navSize} icon={FiCalendar} title="Calendar" active />
<NavItem navSize={navSize} icon={FiUser} title="Clients" />
<NavItem navSize={navSize} icon={FiHome} title="Dashboard" active description="This is the description for the dashboard." />
<Link href='/'><NavItem navSize={navSize} icon={FiCalendar} title="Feed" /></Link>
<Link href="/profile/parselay.lens"><NavItem navSize={navSize} icon={FiUser} title="Profile" href="/profile/parselay.lens"/></Link>
<NavItem navSize={navSize} icon={FiDollarSign} title="Stocks" />
<NavItem navSize={navSize} icon={FiBriefcase} title="Reports" />
<NavItem navSize={navSize} icon={FiSettings} title="Settings" />
Expand All @@ -69,7 +83,7 @@ export default function Sidebar() {
<Divider display={navSize == 'small' ? 'none' : 'flex'} />

<Flex mt={4} align="center">
<Avatar size="sm" src="avatar-1.jpg" />
<SignInButton />
<Flex flexDir="column" ml={4} display={navSize == "small" ? "none" : "flex"}>
<Heading as="h3" size="sm">Liam Arbuckle</Heading>
<Text color="gray">@parselay.lens</Text>
Expand Down
Loading

0 comments on commit 286700a

Please sign in to comment.