Skip to content

Commit bbbdef9

Browse files
authored
✨ Add footer and feedback popover (#250)
1 parent b7ea986 commit bbbdef9

File tree

2 files changed

+103
-32
lines changed

2 files changed

+103
-32
lines changed
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
import {
2+
Box,
3+
Button,
4+
ButtonGroup,
5+
Flex,
6+
Input,
7+
Link,
8+
Popover,
9+
PopoverArrow,
10+
PopoverBody,
11+
PopoverCloseButton,
12+
PopoverContent,
13+
PopoverFooter,
14+
PopoverHeader,
15+
PopoverTrigger,
16+
Text,
17+
Textarea,
18+
} from "@chakra-ui/react"
19+
import { FaCommentDots, FaFileAlt, FaQuestionCircle } from "react-icons/fa"
20+
21+
const Footer = () => {
22+
return (
23+
<Box as="footer" w="100%" p={4}>
24+
<Flex justifyContent="flex-end" alignItems="center">
25+
<Popover>
26+
<PopoverTrigger>
27+
<Link mx={2} display="flex" alignItems="center" cursor="pointer">
28+
<FaCommentDots />{" "}
29+
<Box as="span" ml={1}>
30+
Feedback
31+
</Box>
32+
</Link>
33+
</PopoverTrigger>
34+
<PopoverContent>
35+
<PopoverArrow />
36+
<PopoverCloseButton />
37+
<PopoverHeader fontWeight="semibold">Feedback</PopoverHeader>
38+
<PopoverBody>
39+
<Text my={3}>Please let us know your thoughts and suggestions to help us improve:</Text>
40+
<Input placeholder="Your email" mb={3} />
41+
<Textarea placeholder="Your comments" mb={3} />
42+
</PopoverBody>
43+
<PopoverFooter>
44+
<ButtonGroup size="sm">
45+
<Button>Submit</Button>
46+
<Button variant="outline">Cancel</Button>
47+
</ButtonGroup>
48+
</PopoverFooter>
49+
</PopoverContent>
50+
</Popover>
51+
<Link mx={2} display="flex" alignItems="center">
52+
<FaQuestionCircle />{" "}
53+
<Box as="span" ml={1}>
54+
Help
55+
</Box>
56+
</Link>
57+
<Link mx={2} display="flex" alignItems="center">
58+
<FaFileAlt />{" "}
59+
<Box as="span" ml={1}>
60+
Docs
61+
</Box>
62+
</Link>
63+
</Flex>
64+
</Box>
65+
)
66+
}
67+
68+
export default Footer

frontend/src/routes/_layout.tsx

Lines changed: 35 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
import { Box, Divider, Flex } from "@chakra-ui/react"
1+
import { Box, Flex } from "@chakra-ui/react"
22
import { Outlet, createFileRoute, redirect } from "@tanstack/react-router"
33
import { Suspense } from "react"
44

5+
import Footer from "../components/Common/Footer"
56
import Sidebar from "../components/Common/Sidebar"
67
import UserMenu from "../components/Common/UserMenu"
78
import TeamInvitation from "../components/Invitations/TeamInvitation"
@@ -22,43 +23,45 @@ export const Route = createFileRoute("/_layout")({
2223
function Layout() {
2324
return (
2425
<>
25-
<Flex maxW="large" h="auto">
26-
{/* Sidebar */}
27-
<Box
28-
position="fixed"
29-
top="0"
30-
left="0"
31-
height="100vh"
32-
width={{ md: "250px" }}
33-
zIndex="3"
34-
bg="white"
35-
>
36-
<Suspense>
37-
<Sidebar />
38-
</Suspense>
39-
</Box>
40-
<Flex flexDir="column" flex="1" ml="250px">
41-
{/* Navbar */}
26+
<Flex minHeight="100vh" flexDirection="column">
27+
<Flex flex="1">
28+
{/* Sidebar */}
4229
<Box
43-
display={{ base: "none", md: "flex" }}
44-
justifyContent="flex-end"
4530
position="fixed"
4631
top="0"
47-
right="0"
48-
left={{ base: 0, md: "250px" }}
49-
h="5%"
50-
zIndex="2"
51-
p={4}
52-
bg="white"
32+
left="0"
33+
height="100vh"
34+
width={{ md: "250px" }}
35+
zIndex="3"
5336
>
54-
<UserMenu />
55-
</Box>
56-
<Divider />
57-
{/* Main Content */}
58-
<Box w="100%" mt="5%" p={10}>
59-
<Outlet />
37+
<Suspense>
38+
<Sidebar />
39+
</Suspense>
6040
</Box>
41+
<Flex flexDir="column" flex="1" ml={{ base: 0, md: "250px" }}>
42+
{/* Navbar */}
43+
<Box
44+
id="navbar"
45+
display={{ base: "none", md: "flex" }}
46+
justifyContent="flex-end"
47+
position="fixed"
48+
top="0"
49+
right="0"
50+
left={{ base: 0, md: "250px" }}
51+
height="64px"
52+
zIndex="2"
53+
p={4}
54+
gap="2"
55+
>
56+
<UserMenu />
57+
</Box>
58+
{/* Main Content */}
59+
<Box w="80%" p={10} mt="64px" mx="auto">
60+
<Outlet />
61+
</Box>
62+
</Flex>
6163
</Flex>
64+
<Footer />
6265
</Flex>
6366
<TeamInvitation />
6467
</>

0 commit comments

Comments
 (0)