-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* basic table and filter created w/ chakra Co-authored-by: Jordan Kok Ee Hsin <[email protected]> * expose local web server using ngrok (#43) (#45) * Integrated Ngrok Adjusted docker-compose.yml to run ngrok using my personal authentication token * add environment variable for ngrok authtoken * Add ngrok set-up instructions in README.md * updating ngrok authtoken as variable / exposing port 5001 for backend * environment variable for ngrok authtoken instead of hardcoding * typo * update readme * delete ngrok container * Delete .DS_Store * run linter --------- * basic table and filter created w/ chakra Co-authored-by: Jordan Kok Ee Hsin <[email protected]> * basic table and filter created w/ chakra Co-authored-by: Jordan Kok Ee Hsin <[email protected]> * created table and filtering using chakra * adding navbar template * installing Tailwind + updating Navbar template to be closer to Figma design + routing for Navbar (temp) * uncommenting subLabel - please note .eslintrc.js rules ignoring require-default-props, no-unused-prop-types, and react-in-jsx-scope * center navbar components + improve spacing + rename template names to don efficace specific fields * Navbar linking/routing + Updating navbar to be like Figma design * fixed navbar spacing and link color - reorganized/simplified dashboard/donations/account stack * adding comments + changing Don Efficace. text to a link to homepage * bottom border early * adding tab indicator, reformatted dashboard/donations/acc-mgmt into tabs instead of boxes * making tab indicator responsive + adding rules back to eslintr (reverting previous changes) + small touch ups to navbar + deleting tailwind config as it is unused * adding browserrouter to layout.tsx * touch up * adding linter changes * fixing merge conflicts with main based on pr comments from Matt * merge conflict changes * fixing merge conflicts * fix app.tsx routes * fix merge conflicts --------- Co-authored-by: pahu2353 <[email protected]> Co-authored-by: Jordan Kok Ee Hsin <[email protected]>
- Loading branch information
1 parent
408d7a9
commit 7d69e31
Showing
12 changed files
with
40,892 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// Template for Navbar - To-Do (Reroute this to the Dashboard component) | ||
// Ensure that whatever link paths to dashboard links to layout/dashboard | ||
// For testing (to view the navbar), navigate to localhost:3000/layout | ||
|
||
import React from "react"; | ||
import { Box } from "@chakra-ui/react"; | ||
import { Route, Switch } from "react-router-dom"; | ||
import Navbar from "./NavBar"; | ||
import Dashboard from "../temp_navbar/Dashboard"; | ||
import AccountManagement from "../temp_navbar/AccountManagement"; | ||
import DonationHistory from "../temp_navbar/DonationHistory"; | ||
|
||
const Layout = () => { | ||
return ( | ||
<Box> | ||
<Navbar /> | ||
<Box as="main" p={4}> | ||
<Switch> | ||
<Route path="/layout/dashboard" exact component={Dashboard} /> | ||
<Route | ||
path="/layout/donation-history" | ||
exact | ||
component={DonationHistory} | ||
/> | ||
<Route | ||
path="/layout/account-management" | ||
exact | ||
component={AccountManagement} | ||
/> | ||
</Switch> | ||
</Box> | ||
</Box> | ||
); | ||
}; | ||
|
||
export default Layout; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
import React from "react"; | ||
import { | ||
Box, | ||
Flex, | ||
Text, | ||
Button, | ||
Link, | ||
useColorModeValue, | ||
Tabs, | ||
TabList, | ||
TabIndicator, | ||
Tab, | ||
} from "@chakra-ui/react"; | ||
import { NavLink, Link as RouterLink } from "react-router-dom"; | ||
|
||
interface NavItem { | ||
label: string; | ||
subLabel?: string; | ||
children?: Array<NavItem>; | ||
href: string; | ||
width: string; | ||
} | ||
|
||
const NAV_ITEMS: Array<NavItem> = [ | ||
{ | ||
label: "Dashboard", | ||
href: "/layout/dashboard", | ||
width: "140px", | ||
}, | ||
{ | ||
label: "Donation History", | ||
href: "/layout/donation-history", | ||
width: "190px", | ||
}, | ||
{ | ||
label: "Account Management", | ||
href: "/layout/account-management", | ||
width: "240px", | ||
}, | ||
]; | ||
|
||
export default function Navbar() { | ||
return ( | ||
<Box mb="0"> | ||
<Flex | ||
bg={useColorModeValue("white", "gray.800")} | ||
color={useColorModeValue("gray.600", "white")} | ||
minH="104px" | ||
minW="1100px" | ||
gap="16px" | ||
mb="0" | ||
justify={{ base: "center" }} | ||
py={{ base: 2 }} | ||
px={{ base: 4 }} | ||
borderBottomWidth="1px" | ||
justifyContent="space-between" | ||
borderStyle="solid" | ||
boxShadow="sm" | ||
borderColor={useColorModeValue("gray.200", "gray.900")} | ||
align="flex-end" | ||
alignItems="center" | ||
> | ||
<Text | ||
align="center" | ||
mb="4px" | ||
ml="20px" | ||
alignItems="center" | ||
pl="20px" | ||
minW="230px" | ||
> | ||
<Link | ||
as={RouterLink} | ||
to="/" | ||
_hover={{ textDecoration: "none" }} | ||
_focus={{ outline: "none" }} | ||
_active={{ outline: "none" }} | ||
> | ||
<Text as="span" color="#000000" fontWeight="bold" fontSize="30px"> | ||
Don{" "} | ||
</Text> | ||
<Text as="span" color="#A5154C" fontWeight="bold" fontSize="30px"> | ||
Efficace. | ||
</Text> | ||
</Link> | ||
</Text> | ||
<Tabs position="relative" variant="unstyled"> | ||
<TabList justifyContent="space-between"> | ||
{NAV_ITEMS.map((navItem) => ( | ||
<Tab | ||
key={navItem.label} | ||
minW={navItem.width} | ||
borderStyle="solid" | ||
alignItems="center" | ||
as={RouterLink} | ||
to={navItem.href} | ||
fontSize="20px" | ||
color="#000000" | ||
mx="50px" | ||
_hover={{ | ||
textDecoration: "none", | ||
color: "#000000", | ||
cursor: "pointer", | ||
}} | ||
_focus={{ outline: "none" }} | ||
_active={{ outline: "none" }} | ||
> | ||
{navItem.label} | ||
</Tab> | ||
))} | ||
</TabList> | ||
<TabIndicator | ||
position="absolute" | ||
mt="26px" | ||
height="4px" | ||
bg="#A5154C" | ||
borderRadius="1px" | ||
/> | ||
</Tabs> | ||
<Text align="center" minW="150px" alignItems="center" pr="30px"> | ||
<RouterLink to="/donate"> | ||
<Button | ||
as="a" | ||
width="153px" | ||
height="50px" | ||
display={{ base: "center" }} | ||
fontSize="20px" | ||
ml="20px" | ||
mr="30px" | ||
fontWeight={600} | ||
color="#FFFFFF" | ||
bg="#A5154C" | ||
_hover={{ | ||
bg: "#A5154C", | ||
color: "#FFFFFF", | ||
cursor: "pointer", | ||
}} | ||
> | ||
Donate Now | ||
</Button> | ||
</RouterLink> | ||
</Text> | ||
</Flex> | ||
</Box> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import React from "react"; | ||
|
||
const AccountManagement: React.FC = () => { | ||
return <div>Welcome to Account Management</div>; | ||
}; | ||
|
||
export default AccountManagement; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import React from "react"; | ||
|
||
const Dashboard: React.FC = () => { | ||
return <div>Welcome to the Dashboard</div>; | ||
}; | ||
|
||
export default Dashboard; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import React from "react"; | ||
|
||
const Donate: React.FC = () => { | ||
return <div>Donate Now!!!</div>; | ||
}; | ||
|
||
export default Donate; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import React from "react"; | ||
|
||
const DonationHistory: React.FC = () => { | ||
return <div>Welcome to the Donation History</div>; | ||
}; | ||
|
||
export default DonationHistory; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14265,4 +14265,4 @@ zen-observable-ts@^1.1.0: | |
[email protected], zen-observable@^0.8.14: | ||
version "0.8.15" | ||
resolved "https://registry.npmjs.org/zen-observable/-/zen-observable-0.8.15.tgz" | ||
integrity sha512-PQ2PC7R9rslx84ndNBZB/Dkv8V8fZEpk83RLgXtYd0fwUgEjseMn1Dgajh2x6S8QbZAFa9p2qVCEuYZNgve0dQ== | ||
integrity sha512-PQ2PC7R9rslx84ndNBZB/Dkv8V8fZEpk83RLgXtYd0fwUgEjseMn1Dgajh2x6S8QbZAFa9p2qVCEuYZNgve0dQ== |