Skip to content

Commit

Permalink
feat: Fix settings button not showing up on sign in (#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
RudraPatel2003 authored Dec 27, 2024
1 parent f8d5c6c commit d9ba75e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
"use client";
import { Box, Typography, useTheme } from "@mui/material";
import { LineChart } from "@mui/x-charts";
import dayjs from "dayjs";

import { HealthyHabitsTrackingForm } from "@/types";
import dayjsUtil from "@/utils/dayjsUtil";
Expand All @@ -17,12 +16,12 @@ export default function WeightLineChart({

const chartData = trackingForms
.sort((a, b) =>
dayjs(a.submittedDate, "MM/DD/YYYY").diff(
dayjs(b.submittedDate, "MM/DD/YYYY"),
dayjsUtil(a.submittedDate, "MM/DD/YYYY").diff(
dayjsUtil(b.submittedDate, "MM/DD/YYYY"),
),
)
.map((entry) => ({
x: dayjs(entry.submittedDate, "MM/DD/YYYY").toDate(),
x: dayjsUtil(entry.submittedDate, "MM/DD/YYYY").toDate(),
y: entry.weight,
}));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ type HealthyHabitsHistoryProps = {
export default function HealthyHabitsHistory({
trackingForms,
}: HealthyHabitsHistoryProps) {
// place weight line chart using flex wrap
return (
<Box
sx={{
Expand Down
8 changes: 5 additions & 3 deletions src/components/Header/index.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
"use client";

import SettingsIcon from "@mui/icons-material/Settings";
import { Button } from "@mui/material";
import Link from "next/link";
import { useSession } from "next-auth/react";

import Logo from "@/components/Logo";
import getUserSession from "@/utils/getUserSession";

export default async function Header() {
const session = await getUserSession();
export default function Header() {
const { data: session } = useSession();

return (
<header
Expand Down
2 changes: 1 addition & 1 deletion src/server/api/emails/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default async function sendEmail(
const email = process.env.SCF_GMAIL;

const mailOptions = {
from: email,
from: `St. Christopher Truckers Relief Fund <${email}>`,
to: recipient,
subject,
html,
Expand Down

0 comments on commit d9ba75e

Please sign in to comment.