Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: store user input data in indexedDB; remove sessionStorage #9

Merged
merged 1 commit into from
Sep 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
feat: store user input data in indexedDB; remove sessionStorage
  • Loading branch information
dh-giang-vu committed Sep 15, 2024
commit 0e4a78f60784040b037845423effbd35ac95052c
183 changes: 182 additions & 1 deletion frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,13 @@
"@mui/base": "^5.0.0-beta.40",
"@mui/icons-material": "^5.16.7",
"@mui/material": "^5.16.7",
"dexie": "^4.0.8",
"dexie-react-hooks": "^1.1.7",
"jspreadsheet-ce": "^4.2.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-router-dom": "^6.26.1"
"react-router-dom": "^6.26.1",
"read-excel-file": "^5.8.5"
},
"devDependencies": {
"@eslint/js": "^9.9.0",
Expand Down
16 changes: 8 additions & 8 deletions frontend/src/components/ProceedButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ interface ProceedButtonProps {
fileChosen: File | null;
}

export default function ProceedButton({ fileChosen }:ProceedButtonProps) {
const navigate = useNavigate();
if (fileChosen === null) {
return <Button disabled> Proceed </Button>
} else {
return <Button onClick={() => navigate("/seminfo/campus")}> Proceed</Button>;
}
}` `
export default function ProceedButton({ fileChosen }: ProceedButtonProps) {
const navigate = useNavigate();
if (fileChosen === null) {
return <Button disabled> Proceed </Button>
} else {
return <Button onClick={() => navigate("/seminfo/building")}> Proceed</Button>;
}
}
17 changes: 0 additions & 17 deletions frontend/src/components/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,6 @@ export default function Sidebar({ marginTop, width }: SidebarProps) {
anchor="left"
>
<List>
<ListItem key="Campus" disablePadding>
<ListItemButton component={Link} to="campus">
<ListItemIcon>
<InboxIcon />
</ListItemIcon>
<ListItemText primary="Campus" />
</ListItemButton>
</ListItem>

<ListItem key="Building" disablePadding>
<ListItemButton component={Link} to="building">
Expand All @@ -59,15 +51,6 @@ export default function Sidebar({ marginTop, width }: SidebarProps) {
</ListItemButton>
</ListItem>

<ListItem key="Course" disablePadding>
<ListItemButton component={Link} to="course">
<ListItemIcon>
<InboxIcon />
</ListItemIcon>
<ListItemText primary="Course" />
</ListItemButton>
</ListItem>

<ListItem key="Unit" disablePadding>
<ListItemButton component={Link} to="unit">
<ListItemIcon>
Expand Down
Loading