Skip to content

Commit

Permalink
fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
KobeZ123 committed Nov 3, 2024
1 parent c2cfdd6 commit ddbb298
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 12 deletions.
3 changes: 0 additions & 3 deletions packages/frontend/components/Header/GraduateHeaders.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ import {
Text,
Box,
useMediaQuery,
Stack,
HStack,
ButtonGroup,
} from "@chakra-ui/react";
import { MetaInfoWidget } from "../MetaInfo/MetaInfo";
import { HamburgerIcon, RepeatClockIcon, ChatIcon } from "@chakra-ui/icons";

Check failure on line 20 in packages/frontend/components/Header/GraduateHeaders.tsx

View workflow job for this annotation

GitHub Actions / Run linting for all packages

'ChatIcon' is defined but never used. Allowed unused vars must match /^_/u
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/components/MetaInfo/MetaInfo.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { UpDownIcon } from "@chakra-ui/icons";
import { Box, Flex, Icon, Link, Text, Tooltip } from "@chakra-ui/react";
import { Box, Flex, Link, Text, Tooltip } from "@chakra-ui/react";
import { API } from "@graduate/api-client";
import { Maybe } from "@graduate/common";
import { useState } from "react";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ export const Fall2024ReleaseModalContent: React.FC<ModalContentProps> = ({
onClose,
}) => {
const featurePages: React.ReactNode[] = [
<InProgressIndicatorFeaturePage />,
<SearchNEUIntegrationFeaturePage />,
<InProgressIndicatorFeaturePage key="in-progress-indicator" />,
<SearchNEUIntegrationFeaturePage key="searchneu-integration" />,
];

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@ import {
useState,
ReactNode,
useEffect,
useMemo,
} from "react";
import { WhatsNewModal } from "./WhatsNewModal";
import { Fall2024ReleaseModalContent } from "./Fall2024ReleaseModalContent";
import Cookies from "universal-cookie";

const WhatsNewModalContext = createContext<{ openModal: () => void }>({
openModal: () => {},
openModal: () => {
console.warn("openModal is called without a context provider.");
},
});

export const WhatsNewModalContextProvider = ({
Expand All @@ -20,10 +23,9 @@ export const WhatsNewModalContextProvider = ({
}) => {
const [isOpen, setIsOpen] = useState(false);
const openModal = () => {
console.log("openModal");
setIsOpen(true);
};
const cookies = new Cookies();
const cookies = useMemo(() => new Cookies(), []);

useEffect(() => {
const existingToken = cookies.get("WhatsNewModal JWT");
Expand Down
3 changes: 0 additions & 3 deletions packages/frontend/pages/home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ import {
getPreReqWarnings,
} from "../utils/plan/preAndCoReqCheck";
import { IsGuestContext } from "./_app";
import { WhatsNewModal } from "../components/WhatsNewModal/WhatsNewModal";
import Cookies from "universal-cookie";
import { Fall2024ReleaseModalContent } from "../components/WhatsNewModal/Fall2024ReleaseModalContent";

// Algorithm to decide which droppable the course is currently over (if any).
// See https://docs.dndkit.com/api-documentation/context-provider/collision-detection-algorithms for more info.
Expand Down

0 comments on commit ddbb298

Please sign in to comment.