Skip to content

Commit b1e2e41

Browse files
committed
Format and lint
1 parent 8461ca8 commit b1e2e41

File tree

566 files changed

+1299
-977
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

566 files changed

+1299
-977
lines changed

apps/mobile/src/context/permissions-context.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export type { PermissionsContextValue } from '@norish/shared-react/contexts';
66

77
const { PermissionsProvider, usePermissionsContext } = createPermissionsContext({
88
useCurrentUserId: () => {
9-
// eslint-disable-next-line react-hooks/rules-of-hooks
9+
1010
const { user } = useAuth();
1111
return user?.id;
1212
},

apps/mobile/src/context/recipe-detail-context.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@ const {
4040
useAllergyDetection,
4141
useActiveAllergies,
4242
useConvertMutation: () => {
43-
// eslint-disable-next-line react-hooks/rules-of-hooks
43+
4444
const trpc = useTRPC();
45-
// eslint-disable-next-line react-hooks/rules-of-hooks
45+
4646
return useMutation(trpc.recipes.convertMeasurements.mutationOptions());
4747
},
4848
useRatingQuery,
4949
useRatingsMutation,
5050
useFavoriteIds: () => {
51-
// eslint-disable-next-line react-hooks/rules-of-hooks
51+
5252
const { favoriteIds } = useRecipesContext();
5353
return favoriteIds;
5454
},

apps/mobile/src/context/user-context.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { useTRPC } from '@/providers/trpc-provider';
2020
*/
2121
const shared = createUserContext({
2222
useSessionUser: () => {
23-
// eslint-disable-next-line react-hooks/rules-of-hooks
23+
2424
const { user, isLoading } = useAuth();
2525

2626
const sessionUser: User | null = user
@@ -35,17 +35,17 @@ const shared = createUserContext({
3535
return { user: sessionUser, isLoading };
3636
},
3737
useSignOut: () => {
38-
// eslint-disable-next-line react-hooks/rules-of-hooks
38+
3939
const { signOut } = useAuth();
40-
// eslint-disable-next-line react-hooks/rules-of-hooks
40+
4141
return useCallback(() => {
4242
void signOut();
4343
}, [signOut]);
4444
},
4545
useFreshUserQuery: (userId) => {
46-
// eslint-disable-next-line react-hooks/rules-of-hooks
46+
4747
const trpc = useTRPC();
48-
// eslint-disable-next-line react-hooks/rules-of-hooks
48+
4949
const { data } = useQuery({
5050
...trpc.user.get.queryOptions(),
5151
enabled: Boolean(userId),

apps/web/app/(app)/avatars/[id]/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import fs from "node:fs/promises";
22
import path from "node:path";
3-
import { NextResponse } from "next/server";
43

4+
import { NextResponse } from "next/server";
55
import { SERVER_CONFIG } from "@norish/config/env-config-server";
66

77
export const runtime = "nodejs";

apps/web/app/(app)/calendar/context.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"use client";
22

33
import type { CalendarData } from "@/hooks/calendar";
4+
45
import {
56
createContext,
67
ReactNode,
@@ -11,11 +12,11 @@ import {
1112
useRef,
1213
useState,
1314
} from "react";
14-
import { useCalendarMutations, useCalendarQuery, useCalendarSubscription } from "@/hooks/calendar";
15-
1615
import { Slot } from "@norish/shared/contracts";
1716
import { addWeeks, dateKey, getWeekEnd, getWeekStart } from "@norish/shared/lib/helpers";
1817

18+
import { useCalendarMutations, useCalendarQuery, useCalendarSubscription } from "@/hooks/calendar";
19+
1920
type PlannedItem = {
2021
id: string;
2122
userId: string;

apps/web/app/(app)/calendar/page.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
11
"use client";
22

33
import type { PlannedItemDisplay } from "@/components/calendar/mobile/types";
4+
import type { Slot } from "@norish/shared/contracts";
5+
46
import { useState } from "react";
7+
import { useWindowSize } from "usehooks-ts";
8+
9+
import { CalendarContextProvider } from "./context";
10+
511
import { DesktopTimeline } from "@/components/calendar/desktop";
612
import { MobileTimeline } from "@/components/calendar/mobile";
713
import { EditNotePanel } from "@/components/Panel/consumers/edit-note-panel";
814
import { EditPlannedRecipePanel } from "@/components/Panel/consumers/edit-planned-recipe-panel";
915
import MiniRecipes from "@/components/Panel/consumers/mini-recipes";
10-
import { useWindowSize } from "usehooks-ts";
1116

12-
import type { Slot } from "@norish/shared/contracts";
1317

14-
import { CalendarContextProvider } from "./context";
1518

1619
function CalendarPageContent() {
1720
const [miniRecipesOpen, setMiniRecipesOpen] = useState(false);

apps/web/app/(app)/groceries/components/add-grocery-button.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
"use client";
22

3-
import { useAutoHide } from "@/hooks/auto-hide";
43
import { PlusIcon } from "@heroicons/react/16/solid";
54
import { Button } from "@heroui/react";
65
import { motion } from "motion/react";
76
import { useTranslations } from "next-intl";
87

98
import { useGroceriesUIContext } from "../context";
109

10+
import { useAutoHide } from "@/hooks/auto-hide";
11+
1112
/**
1213
* Mobile floating add button that repositions based on nav visibility.
1314
* - Nav visible: sits just above the nav bar

apps/web/app/(app)/groceries/components/groceries-page.tsx

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
"use client";
22

3-
import { GroceryList, GroceryListByRecipe, StoreManagerPanel } from "@/components/groceries";
4-
import { AddGroceryPanel } from "@/components/Panel/consumers";
5-
import EditGroceryPanel from "@/components/Panel/consumers/edit-grocery-panel";
6-
import GrocerySkeleton from "@/components/skeleton/grocery-skeleton";
3+
import type { GroceryDto } from "@norish/shared/contracts";
4+
import type { RecurrencePattern } from "@norish/shared/contracts/recurrence";
5+
76
import {
87
BookOpenIcon,
98
BuildingStorefrontIcon,
@@ -22,13 +21,17 @@ import {
2221
} from "@heroui/react";
2322
import { useTranslations } from "next-intl";
2423

25-
import type { GroceryDto } from "@norish/shared/contracts";
26-
import type { RecurrencePattern } from "@norish/shared/contracts/recurrence";
2724

2825
import { useGroceriesContext, useGroceriesUIContext } from "../context";
2926
import { useStoresContext } from "../stores-context";
27+
3028
import AddGroceryButton from "./add-grocery-button";
3129

30+
import GrocerySkeleton from "@/components/skeleton/grocery-skeleton";
31+
import EditGroceryPanel from "@/components/Panel/consumers/edit-grocery-panel";
32+
import { AddGroceryPanel } from "@/components/Panel/consumers";
33+
import { GroceryList, GroceryListByRecipe, StoreManagerPanel } from "@/components/groceries";
34+
3235
export function GroceriesPage() {
3336
const {
3437
groceries,

apps/web/app/(app)/groceries/components/recurrence-pill.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
"use client";
22

3+
import type { RecurringGroceryDto } from "@norish/shared/contracts";
4+
import type { RecurrenceTranslations } from "@norish/shared/lib/recurrence/formatter";
5+
36
import { ArrowPathIcon, XMarkIcon } from "@heroicons/react/16/solid";
47
import { motion } from "motion/react";
58
import { useTranslations } from "next-intl";
6-
7-
import type { RecurringGroceryDto } from "@norish/shared/contracts";
8-
import type { RecurrenceTranslations } from "@norish/shared/lib/recurrence/formatter";
99
import { isOverdue } from "@norish/shared/lib/recurrence/calculator";
1010
import {
1111
formatNextOccurrence,

apps/web/app/(app)/groceries/components/recurrence-suggestion.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
"use client";
22

3-
import { motion } from "motion/react";
4-
53
import type { RecurrencePattern } from "@norish/shared/contracts/recurrence";
4+
5+
import { motion } from "motion/react";
66
import { calculateNextOccurrence, getTodayString } from "@norish/shared/lib/recurrence/calculator";
77

88
import { RecurrencePill } from "./recurrence-pill";

0 commit comments

Comments
 (0)