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

Link account menu button to profile page #60

Merged
merged 2 commits into from
Aug 27, 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
1 change: 1 addition & 0 deletions budgetmanagerpwa/.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
VITE_API_URL=api/
VITE_LOGIN_URL=/accounts/login/?next=
VITE_PROFILE_URL=/accounts/profile/
VITE_STORAGE_KEY=budgetmanagersettings
8 changes: 7 additions & 1 deletion budgetmanagerpwa/src/components/MenuDrawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import StoreIcon from '@mui/icons-material/Store'
import PaymentsIcon from '@mui/icons-material/Payments'
import InstallPwaListItem from './InstallPwaListItem'
import { User } from '../redux/types'
import { Link } from 'react-router-dom'

export type MenuDrawerProps = SwipeableDrawerProps & { user: User }

Expand Down Expand Up @@ -58,7 +59,12 @@ export default function MenuDrawer(props: MenuDrawerProps) {
<Divider component="li" />
<InstallPwaListItem />
<ListItem>
<ListItemButton>
<ListItemButton
component={Link}
to={import.meta.env.VITE_PROFILE_URL}
target="_blank"
rel="noopener"
>
<ListItemIcon>
<AccountCircleIcon />
</ListItemIcon>
Expand Down
1 change: 1 addition & 0 deletions budgetmanagerpwa/src/vite-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
interface ImportMetaEnv {
readonly VITE_API_URL: string
readonly VITE_LOGIN_URL: string
readonly VITE_PROFILE_URL: string
readonly VITE_STORAGE_KEY: string
}

Expand Down