-
Notifications
You must be signed in to change notification settings - Fork 1
feat: ✨ user settings #430
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
Changes from 4 commits
7ea3fab
8806dff
45cb4f1
38dd182
be88a19
6a1ee61
e708e72
520717f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,7 @@ | ||
| import Box from "@mui/material/Box"; | ||
| import Typography from "@mui/material/Typography"; | ||
| import { notFound, redirect } from "next/navigation"; | ||
| import { ProfileSettings } from "@/components/profile/profile-settings"; | ||
| import { getCurrentSession } from "@/lib/auth"; | ||
| import { ProfileContent } from "./profile-content"; | ||
|
|
||
|
|
@@ -12,5 +15,21 @@ export default async function ProfilePage() { | |
| notFound(); | ||
| } | ||
|
|
||
| return <ProfileContent />; | ||
| return ( | ||
| <Box sx={{ px: 8, py: 8 }}> | ||
| <Typography | ||
| variant="h4" | ||
| sx={{ fontWeight: 600, fontFamily: "Figtree, sans-serif" }} | ||
| > | ||
| Settings | ||
| </Typography> | ||
|
|
||
| <Box sx={{ mt: 8 }}> | ||
| <ProfileSettings user={session.user} /> | ||
| </Box> | ||
| <Box sx={{ mt: 8, display: { md: "none" } }}> | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: perfer tailwind className styles over sx |
||
| <ProfileContent /> | ||
| </Box> | ||
| </Box> | ||
| ); | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| import { Button, Chip, Switch, Typography } from "@mui/material/"; | ||
| import { Avatar, Button, Chip, Switch, Typography } from "@mui/material/"; | ||
| import { XIcon } from "lucide-react"; | ||
| import { useCallback, useEffect, useMemo, useState } from "react"; | ||
| import { useShallow } from "zustand/shallow"; | ||
|
|
@@ -247,7 +247,13 @@ export function GroupResponses({ | |
| <Chip | ||
| key={member.memberId} | ||
| clickable | ||
| //put pfp here once user settings merged. icon={} | ||
| icon={ | ||
| <Avatar | ||
| alt={member.displayName} | ||
| src={member.profilePicture ?? undefined} | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. make sure to add referrerPolicy: "no-referrer" to prevent them from being blocked by Google's CDN |
||
| sx={{ width: 24, height: 24, fontSize: 12 }} | ||
| /> | ||
| } | ||
| label={member.displayName} | ||
| color={ | ||
| selectedMembers.includes(member.memberId) | ||
|
|
@@ -291,6 +297,13 @@ export function GroupResponses({ | |
| {pendingMembers.map((member) => ( | ||
| <Chip | ||
| key={member.memberId} | ||
| icon={ | ||
| <Avatar | ||
| alt={member.displayName} | ||
| src={member.profilePicture ?? undefined} | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same comment as before: make sure to add referrerPolicy: "no-referrer" to prevent them from being blocked by Google's CDN |
||
| sx={{ height: 24, width: 24 }} | ||
| /> | ||
| } | ||
| label={member.displayName} | ||
| variant="outlined" | ||
| /> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: figtree font is already applied globally