From 3f6ee2082cd5b8eb79466d6ddaf565000a80519e Mon Sep 17 00:00:00 2001 From: Noah Onyejese <129368606+noahonyejese@users.noreply.github.com> Date: Tue, 7 Jan 2025 10:49:15 +0100 Subject: [PATCH 1/3] feat: Added Footer to Profile Page --- app/login/components/profile-content-tabs.tsx | 16 ++++++++++------ app/login/utils.ts | 11 +++++++++-- app/pages/profile.tsx | 6 +++++- 3 files changed, 24 insertions(+), 9 deletions(-) diff --git a/app/login/components/profile-content-tabs.tsx b/app/login/components/profile-content-tabs.tsx index b8f80e37f..dd9a82318 100644 --- a/app/login/components/profile-content-tabs.tsx +++ b/app/login/components/profile-content-tabs.tsx @@ -1,6 +1,6 @@ import { t } from "@lingui/macro"; import { TabContext, TabList, TabPanel } from "@mui/lab"; -import { Box, Tab, Theme } from "@mui/material"; +import { Box, Tab, Theme, useTheme } from "@mui/material"; import { makeStyles } from "@mui/styles"; import clsx from "clsx"; import groupBy from "lodash/groupBy"; @@ -12,9 +12,6 @@ import { useRootStyles } from "@/login/utils"; import useEvent from "@/utils/use-event"; const useStyles = makeStyles((theme) => ({ - section: { - marginTop: theme.spacing(6), - }, tabList: { minHeight: "fit-content", @@ -49,6 +46,7 @@ export const ProfileContentTabs = (props: ProfileContentTabsProps) => { const handleChange = useEvent((_: React.SyntheticEvent, v: string) => { setValue(v); }); + const theme = useTheme(); const rootClasses = useRootStyles(); const classes = useStyles(); @@ -66,9 +64,15 @@ export const ProfileContentTabs = (props: ProfileContentTabsProps) => { return ( - + - + ((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%", @@ -20,7 +28,6 @@ export const useRootStyles = makeStyles((theme) => ({ margin: "0 auto", }, noTooltip: { - // Disable native tooltip in Safari "&::after": { content: "''", display: "block", diff --git a/app/pages/profile.tsx b/app/pages/profile.tsx index 96f02658c..2161b2a7f 100644 --- a/app/pages/profile.tsx +++ b/app/pages/profile.tsx @@ -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"; @@ -57,7 +58,10 @@ const ProfilePage = (props: Serialized) => { - + + + +