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: Added Footer to Profile Page #1947

Merged
merged 3 commits into from
Jan 8, 2025
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 CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ You can also check the
- Fixed preview via API (iframe)
- Fixed cut table scroll-bars and unnecessary scroll of bar charts when
switching between chart types
- Added Footer to the Profile Page

# [5.0.2] - 2024-11-28

Expand Down
7 changes: 5 additions & 2 deletions app/login/components/profile-content-tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import useEvent from "@/utils/use-event";

const useStyles = makeStyles<Theme>((theme) => ({
section: {
borderBottom: 1,
borderColor: "divider",
marginTop: theme.spacing(6),
},
tabList: {
Expand Down Expand Up @@ -49,6 +51,7 @@ export const ProfileContentTabs = (props: ProfileContentTabsProps) => {
const handleChange = useEvent((_: React.SyntheticEvent, v: string) => {
setValue(v);
});

const rootClasses = useRootStyles();
const classes = useStyles();

Expand All @@ -66,9 +69,9 @@ export const ProfileContentTabs = (props: ProfileContentTabsProps) => {

return (
<TabContext value={value}>
<Box className={clsx(rootClasses.section, classes.section)}>
<Box className={clsx(rootClasses.section)}>
<Box className={rootClasses.sectionContent}>
<Box sx={{ borderBottom: 1, borderColor: "divider" }}>
<Box className={classes.section}>
<TabList className={classes.tabList} onChange={handleChange}>
<Tab
className={classes.tab}
Expand Down
10 changes: 9 additions & 1 deletion app/login/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,20 @@ import { HEADER_HEIGHT } from "@/components/header-constants";
export const useRootStyles = makeStyles<Theme>((theme) => ({
root: {
marginTop: `${HEADER_HEIGHT}px`,
backgroundColor: theme.palette.muted.main,
minHeight: `calc(100vh - ${HEADER_HEIGHT}px)`,
display: "flex",
flexDirection: "column",
},
content: {
flexGrow: 1,
display: "flex",
flexDirection: "column",
},
section: {
display: "flex",
flexDirection: "column",
padding: `0 ${theme.spacing(6)}`,
backgroundColor: theme.palette.muted.main,
},
sectionContent: {
width: "100%",
Expand Down
6 changes: 5 additions & 1 deletion app/pages/profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { User } from "@prisma/client";
import { GetServerSideProps } from "next";
import { getServerSession } from "next-auth";

import { Footer } from "@/components/footer";
import { AppLayout } from "@/components/layout";
import { getUserConfigs, ParsedConfig } from "@/db/config";
import { deserializeProps, Serialized, serializeProps } from "@/db/serialize";
Expand Down Expand Up @@ -57,7 +58,10 @@ const ProfilePage = (props: Serialized<PageProps>) => {
<AppLayout>
<Box className={rootClasses.root}>
<ProfileHeader user={user} />
<ProfileContentTabs userId={user.id} />
<Box sx={{ flexGrow: 1, display: "flex", flexDirection: "column" }}>
<ProfileContentTabs userId={user.id} />
</Box>
<Footer />
noahonyejese marked this conversation as resolved.
Show resolved Hide resolved
</Box>
</AppLayout>
);
Expand Down
Loading