Skip to content

Commit

Permalink
feat(QuickTrackNav): add settings link
Browse files Browse the repository at this point in the history
  • Loading branch information
benji6 committed Nov 11, 2024
1 parent 8eb8693 commit b0ee6a4
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
11 changes: 9 additions & 2 deletions client/src/components/pages/Home/QuickTrackNav/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Button, Icon, Paper } from "eri";
import { QuickTrackNavButton } from "./QuickTrackNavButton";
import { TEST_IDS } from "../../../../constants";
import appSlice from "../../../../store/appSlice";
import { useNavigate } from "react-router-dom";
import { Link, useNavigate } from "react-router-dom";
import { useSelector } from "react-redux";

export function QuickTrackNav() {
Expand All @@ -12,7 +12,14 @@ export function QuickTrackNav() {

return (
<Paper data-test-id={TEST_IDS.moodList}>
<h2>Home</h2>
<h2 className="quick-track-nav__heading">
Home
<div className="quick-track-nav__settings-icon">
<Link to="/settings/events">
<Icon name="settings" />
</Link>
</div>
</h2>
<div className="quick-track-nav__links">
{(["moods", "sleeps", "weights"] as const)
.filter((eventType) => eventTypeTracking[eventType])
Expand Down
9 changes: 9 additions & 0 deletions client/src/components/pages/Home/QuickTrackNav/style.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
.quick-track-nav__heading {
display: flex;
justify-content: space-between;
}

.quick-track-nav__links {
display: grid;
gap: var(--space-2);
grid-template-columns: repeat(auto-fit, minmax(10em, 1fr));
justify-content: center;
}

.quick-track-nav__settings-icon {
font-size: var(--font-size-1);
}

0 comments on commit b0ee6a4

Please sign in to comment.