Skip to content

Commit

Permalink
ci(frontend): apply linting warning
Browse files Browse the repository at this point in the history
  • Loading branch information
IgnisDa committed May 6, 2023
1 parent c21c9ce commit 04fdd97
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion apps/frontend/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const Page: NextPageWithLayout = () => {
<Stack>
{userSummary.isLoading ? <Loader /> : null}
{userSummary.isError ? (
<Alert color='yellow' icon={<IconAlertCircle size="1rem" />}>
<Alert color="yellow" icon={<IconAlertCircle size="1rem" />}>
You have not generated any summaries yet. Click below to generate
one.
</Alert>
Expand Down
8 changes: 4 additions & 4 deletions apps/frontend/src/pages/media/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { Verb, getInitials, getVerb } from "@/lib/utilities";
import { Carousel } from "@mantine/carousel";
import {
Accordion,
ActionIcon,
Alert,
Anchor,
Avatar,
Expand Down Expand Up @@ -45,7 +44,6 @@ import {
} from "@ryot/graphql/backend/queries";
import {
IconAlertCircle,
IconEdit,
IconInfoCircle,
IconMessageCircle2,
IconPlayerPlay,
Expand Down Expand Up @@ -399,7 +397,7 @@ const Page: NextPageWithLayout = () => {
legacyBehavior
>
<Anchor>
<Button variant="outline" w='100%'>
<Button variant="outline" w="100%">
Post a review
</Button>
</Anchor>
Expand Down Expand Up @@ -559,10 +557,12 @@ const Page: NextPageWithLayout = () => {
{DateTime.fromJSDate(r.postedOn).toLocaleString()}
</Text>
</Box>
{/* TODO: Render this element on when it is the currently logged in user */}
{/*
TODO: Render this element on when it is the currently logged in user
<ActionIcon>
<IconEdit size="1rem" />
</ActionIcon>
*/}
</Flex>
<Box ml={"sm"} mt={"xs"}>
{r.rating ? (
Expand Down
26 changes: 13 additions & 13 deletions apps/frontend/src/pages/media/update-progress.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import { gqlClient } from "@/lib/services/api";
import type { NextPageWithLayout } from "../_app";
import LoggedIn from "@/lib/layouts/LoggedIn";
import { useMutation, useQuery } from "@tanstack/react-query";
import { MEDIA_DETAILS } from "@ryot/graphql/backend/queries";
import { useRouter } from "next/router";
import { useState, type ReactElement } from "react";
import { gqlClient } from "@/lib/services/api";
import { Verb, getVerb } from "@/lib/utilities";
import {
Alert,
Button,
Expand All @@ -15,15 +12,18 @@ import {
Stack,
Title,
} from "@mantine/core";
import { DatePickerInput } from "@mantine/dates";
import {
ProgressUpdateAction,
type ProgressUpdateMutationVariables,
} from "@ryot/generated/graphql/backend/graphql";
import { PROGRESS_UPDATE } from "@ryot/graphql/backend/mutations";
import { Verb, getVerb } from "@/lib/utilities";
import { DatePickerInput } from "@mantine/dates";
import { DateTime } from "luxon";
import { MEDIA_DETAILS } from "@ryot/graphql/backend/queries";
import { IconAlertCircle } from "@tabler/icons-react";
import { useMutation, useQuery } from "@tanstack/react-query";
import { DateTime } from "luxon";
import { useRouter } from "next/router";
import { type ReactElement, useState } from "react";

const Page: NextPageWithLayout = () => {
const router = useRouter();
Expand Down Expand Up @@ -55,7 +55,7 @@ const Page: NextPageWithLayout = () => {
if (onlySeason) {
for (const episode of details.data?.showSpecifics?.seasons.find(
(s) => s.seasonNumber.toString() === selectedSeason,
)!.episodes || []) {
)?.episodes || []) {
await gqlClient.request(PROGRESS_UPDATE, {
input: { ...variables.input, episodeNumber: episode.episodeNumber },
});
Expand All @@ -82,7 +82,7 @@ const Page: NextPageWithLayout = () => {

return details.data && title ? (
<Container size={"xs"}>
<Stack pos={"relative"} p='sm'>
<Stack pos={"relative"} p="sm">
<LoadingOverlay
visible={progressUpdate.isLoading}
overlayBlur={2}
Expand All @@ -92,7 +92,7 @@ const Page: NextPageWithLayout = () => {
{details.data.showSpecifics ? (
<>
{onlySeason ? (
<Alert color='yellow' icon={<IconAlertCircle size="1rem" />}>
<Alert color="yellow" icon={<IconAlertCircle size="1rem" />}>
This will mark all episodes for Season {selectedSeason} as seen
</Alert>
) : null}
Expand All @@ -112,8 +112,8 @@ const Page: NextPageWithLayout = () => {
<Select
label="Episode"
data={details.data.showSpecifics.seasons
.find((s) => s.seasonNumber === Number(selectedSeason))!
.episodes.map((e) => ({
.find((s) => s.seasonNumber === Number(selectedSeason))
?.episodes.map((e) => ({
label: `${e.episodeNumber}. ${e.name.toString()}`,
value: e.episodeNumber.toString(),
}))}
Expand Down

0 comments on commit 04fdd97

Please sign in to comment.