Skip to content

Commit c7c1bb1

Browse files
authored
Chore/fix lint warnings (#383)
* fix linting issues * address remaining lint warnings * fix type error in theme * undo color changes
1 parent 372f88d commit c7c1bb1

File tree

8 files changed

+12
-15
lines changed

8 files changed

+12
-15
lines changed

src/backend/routers/para.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { z } from "zod";
2-
import { getTransporter } from "../lib/nodemailer";
32
import { authenticatedProcedure, router } from "../trpc";
43
import { createPara } from "../lib/db_helpers/case_manager";
54

@@ -44,7 +43,7 @@ export const para = router({
4443
})
4544
)
4645
.mutation(async (req) => {
47-
const { first_name, last_name, email } = req.input;
46+
const { email } = req.input;
4847

4948
const para = await createPara(
5049
req.input,

src/components/iep/Iep.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { trpc } from "@/client/lib/trpc";
22
import Goals from "@/components/goal/Goal";
33
import $button from "@/components/design_system/button/Button.module.css";
4-
import $input from "@/styles/Input.module.css";
54
import Box from "@mui/material/Box";
65
import Container from "@mui/material/Container";
76
import List from "@mui/material/List";

src/components/subgoal/Subgoal.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { trpc } from "@/client/lib/trpc";
21
import { Subgoal } from "@/types/global";
32
import Box from "@mui/material/Box";
43
import Button from "@mui/material/Button";

src/components/uploadPicture/uploadImage.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import CameraIcon from "@mui/icons-material/PhotoCamera";
66
import CheckCircleIcon from "@mui/icons-material/CheckCircle";
77
import CircularProgress from "@mui/material/CircularProgress";
88
import Typography from "@mui/material/Typography";
9+
import Image from "next/image";
910

1011
interface UploadImageProps {
1112
label: string;
@@ -117,7 +118,7 @@ const UploadImage = ({ label, onUpload }: UploadImageProps) => {
117118
{currentStep === UploadStep.UploadPicture && (
118119
<div className={styles.uploadContainer}>
119120
{selectedFile && (
120-
<img
121+
<Image
121122
src={URL.createObjectURL(selectedFile)}
122123
className={styles.imagePreview}
123124
alt="preview of image"

src/components/uploadedFile/uploadedFile.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { useEffect } from "react";
44
import styles from "./uploadedFile.module.css";
55
import { QuestionMark } from "@mui/icons-material";
66
import DeleteIcon from "@mui/icons-material/Delete";
7+
import Image from "next/image";
78

89
interface UploadedFileProps {
910
fileId: string;
@@ -23,7 +24,7 @@ export const UploadedFile = ({ fileId, onDelete }: UploadedFileProps) => {
2324
{data ? (
2425
<>
2526
{data.content_type.startsWith("image/") ? (
26-
<img
27+
<Image
2728
src={data.url}
2829
className={styles.image}
2930
alt={`user uploaded image: ${data.name}`}
@@ -33,7 +34,6 @@ export const UploadedFile = ({ fileId, onDelete }: UploadedFileProps) => {
3334
<QuestionMark />
3435
</div>
3536
)}
36-
3737
<a
3838
href={data.url}
3939
target="_blank"

src/pages/staff/[user_id].tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { useState } from "react";
22
import { trpc } from "@/client/lib/trpc";
33
import { useRouter } from "next/router";
4-
import $home from "@/styles/Home.module.css";
54
import $button from "@/components/design_system/button/Button.module.css";
65
import $StaffPage from "../../styles/StaffPage.module.css";
76
import $Modal from "../../styles/Modal.module.css";

src/styles/Home.module.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* TODO: Once the home page is remade/restyled, remove this file from global styles (or edit as necessary) */
1+
/* TODO: Once the sign in page is remade/restyled, remove this file from global styles (or edit as necessary) */
22

33
/* NON SESSION USER HOMEPAGE */
44
.greetWrap {

src/theme.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { createTheme } from "@mui/material";
1+
import { createTheme, Shadows } from "@mui/material";
22

33
const { breakpoints } = createTheme();
44

@@ -32,9 +32,9 @@ export const compassTheme = createTheme({
3232
"0px 1px 3px 0px rgba(0, 0, 0, 0.30), 0px 4px 8px 3px rgba(0, 0, 0, 0.15)",
3333
"0px 2px 3px 0px rgba(0, 0, 0, 0.30), 0px 6px 10px 4px rgba(0, 0, 0, 0.15)",
3434
"0px 4px 4px 0px rgba(0, 0, 0, 0.30), 0px 8px 12px 6px rgba(0, 0, 0, 0.15)",
35-
...new Array(20).map(() => "none"),
35+
...new Array(19).map(() => "none"),
3636
// type requires 20+ elements
37-
] as any,
37+
] as Shadows,
3838
typography: {
3939
allVariants: {
4040
letterSpacing: "normal",
@@ -146,7 +146,7 @@ export const compassTheme = createTheme({
146146
MuiStep: {
147147
defaultProps: {},
148148
styleOverrides: {
149-
root: ({ ownerState, theme }) => ({
149+
root: ({ ownerState }) => ({
150150
padding: 0,
151151
marginRight: !ownerState.last ? "16px" : 0,
152152
"&.Mui-disabled": {
@@ -163,7 +163,7 @@ export const compassTheme = createTheme({
163163
},
164164
MuiStepLabel: {
165165
styleOverrides: {
166-
iconContainer: ({ ownerState, theme }) => ({
166+
iconContainer: ({ theme }) => ({
167167
position: "absolute",
168168
left: 0,
169169
height: "100%",
@@ -179,7 +179,7 @@ export const compassTheme = createTheme({
179179
color: theme.palette.primary.main,
180180
},
181181
}),
182-
label: ({ ownerState, theme }) => ({
182+
label: ({ theme }) => ({
183183
padding: "9px",
184184
paddingLeft: "32px",
185185
textAlign: "left",

0 commit comments

Comments
 (0)