This commit is contained in:
NK 2023-04-04 17:14:34 +01:00
parent cb7106ff0d
commit 1b704948c5
3 changed files with 22 additions and 15 deletions

View file

@ -23,12 +23,12 @@ import { MdKeyboardArrowRight, MdHome } from "react-icons/md";
import AuthButton from "../AuthButton"; import AuthButton from "../AuthButton";
import Link from "next/link"; import Link from "next/link";
import React from "react"; import React from "react";
import { session } from "next-auth/client"; import { session, useSession } from "next-auth/client";
export default function Sidebar({ children }) { export default function Sidebar({ children }) {
const sidebar = useDisclosure(); const sidebar = useDisclosure();
const integrations = useDisclosure(); const integrations = useDisclosure();
const [session, loading] = useSession();
const NavItem = props => { const NavItem = props => {
const { icon, children, ...rest } = props; const { icon, children, ...rest } = props;
return ( return (
@ -167,7 +167,13 @@ export default function Sidebar({ children }) {
<Flex align="center"> <Flex align="center">
<Icon color="gray.500" as={FaBell} cursor="pointer" /> <Icon color="gray.500" as={FaBell} cursor="pointer" />
<Avatar ml="4" size="sm" name="anubra266" src="" cursor="pointer" /> <Avatar
ml="4"
size="sm"
name="anubra266"
src={session?.user.image ? session.user.image : ""}
cursor="pointer"
/>
</Flex> </Flex>
</Flex> </Flex>

View file

@ -7,25 +7,25 @@
"start": "next start", "start": "next start",
"lint": "next lint" "lint": "next lint"
}, },
"devDependencies": {
"eslint": "^8.37.0",
"eslint-config-next": "^13.2.4"
},
"dependencies": { "dependencies": {
"@chakra-ui/icons": "^1.0.13", "@chakra-ui/icons": "^1.0.13",
"@chakra-ui/react": "^1.6.4", "@chakra-ui/react": "^1.6.4",
"@emotion/react": "^11", "@emotion/react": "^11.10.6",
"@emotion/styled": "^11", "@emotion/styled": "^11.10.6",
"@material-ui/core": "^4.11.4", "@mui/material": "^5.11.15",
"@material-ui/icons": "^4.11.2", "@mui/styles": "^5.11.13",
"axios": "^0.24.0", "axios": "^0.27.2",
"framer-motion": "^4", "framer-motion": "^6.5.1",
"mongodb": "^3.5.9", "mongodb": "^3.5.9",
"next": "^12.3.4", "next": "^12.3.4",
"next-auth": "^3.27.0", "next-auth": "^3.27.0",
"react": "^17.0.2", "react": "^17.0.2",
"react-dom": "^17.0.2", "react-dom": "^17.0.2",
"react-icons": "^4.2.0", "react-icons": "^4.8.0",
"skyhelper-networth": "^1.11.5" "skyhelper-networth": "^1.12.3"
},
"devDependencies": {
"eslint": "^8.2.0",
"eslint-config-next": "11.0.0"
} }
} }

View file

@ -7,6 +7,7 @@ export default NextAuth({
Providers.Discord({ Providers.Discord({
clientId: process.env.DISCORD_ID, clientId: process.env.DISCORD_ID,
clientSecret: process.env.DISCORD_SECRET, clientSecret: process.env.DISCORD_SECRET,
scope: "identify guilds guilds.join bot email",
}), }),
// ...add more providers here // ...add more providers here
], ],