Skip to content
This repository was archived by the owner on Feb 10, 2025. It is now read-only.

Commit 8dec94d

Browse files
authored
fix: revert all components to client components (#109)
chore: revert all components to client components
1 parent e5d7401 commit 8dec94d

File tree

79 files changed

+148
-42
lines changed

Some content is hidden

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

79 files changed

+148
-42
lines changed

eslint.config.js

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ export default tseslint.config(
2525
"@typescript-eslint/no-non-null-assertion": "warn",
2626
"@typescript-eslint/no-explicit-any": "warn",
2727
"@typescript-eslint/consistent-type-definitions": "warn",
28+
"tailwindcss/enforces-shorthand": "off",
2829
},
2930
},
3031
eslintConfigPrettier,

package.json

-15
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,6 @@
2828
"import": "./dist/index.js",
2929
"require": "./dist/index.js"
3030
},
31-
"./client": {
32-
"types": "./dist/clientComponents.d.ts",
33-
"import": "./dist/clientComponents.js",
34-
"require": "./dist/clientComponents.js"
35-
},
3631
"./hooks": {
3732
"types": "./dist/hooks.d.ts",
3833
"import": "./dist/hooks.js",
@@ -73,11 +68,6 @@
7368
"import": "./dist/pool.js",
7469
"require": "./dist/pool.js"
7570
},
76-
"./pool/client": {
77-
"types": "./dist/poolClientComponents.d.ts",
78-
"import": "./dist/poolClientComponents.js",
79-
"require": "./dist/poolClientComponents.js"
80-
},
8171
"./program": {
8272
"types": "./dist/program.d.ts",
8373
"import": "./dist/program.js",
@@ -88,11 +78,6 @@
8878
"import": "./dist/project.js",
8979
"require": "./dist/project.js"
9080
},
91-
"./project/client": {
92-
"types": "./dist/projectClientComponents.d.ts",
93-
"import": "./dist/projectClientComponents.js",
94-
"require": "./dist/projectClientComponents.js"
95-
},
9681
"./retrofunding": {
9782
"types": "./dist/retrofunding.d.ts",
9883
"import": "./dist/retrofunding.js",

src/clientComponents.ts

-2
This file was deleted.

src/components/AllocationSidebar/AllocationSidebar.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"use client";
2+
13
import { cn } from "@/lib/utils";
24
import { ScrollArea, ScrollBar } from "@/primitives/ScrollArea";
35

src/components/AllocationSidebar/components/AllocationItem.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import { PropsWithChildren } from "react";
22

3-
import { ProjectAllocation } from "@/components/AllocationSidebar";
43
import { cn } from "@/lib/utils";
54
import { Skeleton } from "@/primitives/Skeleton";
65

6+
import { ProjectAllocation } from "../types";
7+
78
export const AllocationItem = ({
89
id,
910
name,

src/components/EvaluationForm/EvaluationForm.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"use client";
2+
13
import * as React from "react";
24

35
import { tv } from "tailwind-variants";

src/components/IconLabel/IconLabel.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"use client";
2+
13
import React from "react";
24

35
import { match } from "ts-pattern";

src/components/ProgressModal/ProgressModal.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"use client";
2+
13
import { Check, X } from "lucide-react";
24

35
import { Modal } from "@/primitives/Modal";

src/components/RadioGroupList/RadioGroupList.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"use client";
2+
13
import * as React from "react";
24

35
import { tv } from "tailwind-variants";

src/components/SetupProgressForm/hooks/useFormProgress.ts

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"use client";
2+
13
import { useState, useEffect } from "react";
24

35
import { openDB } from "idb";

src/components/SideNav/components/AccordionItem.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"use client";
2+
13
import { SideNav, SideNavItem, sideNavVariants } from "@/components/SideNav";
24
import { Accordion, AccordionProps } from "@/primitives/Accordion";
35
import { Icon } from "@/primitives/Icon";

src/components/clientComponents.ts

-3
This file was deleted.

src/components/index.ts

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
export * from "./AllocationSidebar";
22
export * from "./EvaluationForm";
3+
export * from "./Form";
34
export * from "./IconLabel";
45
export * from "./ProgressModal";
56
export * from "./RadioGroupList";
7+
export * from "./SetupProgressForm";
68
export * from "./SideNav";
9+
export * from "./Toaster";

src/features/application/components/ApplicationBadge/ApplicationBadge.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"use client";
2+
13
import * as React from "react";
24

35
import { tv } from "tailwind-variants";

src/features/application/components/ApplicationSummary/ApplicationSummary.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"use client";
2+
13
import { IconLabel } from "@/components/IconLabel";
24
import { DateFormat, formatDate } from "@/lib/dates/formatDate";
35
import { Accordion } from "@/primitives/Accordion";
@@ -6,7 +8,7 @@ import { ListGrid, ListGridColumn } from "@/primitives/ListGrid";
68
import { Markdown } from "@/primitives/Markdown";
79

810
import { PastApplication, ProjectApplication, ProjectMetadata } from "~checker/services/allo/types";
9-
import { ProjectSummary } from "~project/clientComponents";
11+
import { ProjectSummary } from "~project";
1012

1113
import { ApplicationBadge, ApplicationBadgeStatus } from "../ApplicationBadge";
1214

src/features/checker/apps/ApplicationView.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"use client";
2+
13
import {
24
ViewApplicationEvaluationsPage,
35
ViewApplicationEvaluationsPageProps,

src/features/checker/apps/Checker.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"use client";
2+
13
import { Hex } from "viem";
24

35
import { Step } from "@/components/ProgressModal";

src/features/checker/components/ApplicationHistoryList/ApplicationHistoryList.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"use client";
2+
13
import { IconLabel } from "@/components/IconLabel";
24
import { ListGrid, ListGridColumn } from "@/primitives/ListGrid";
35

src/features/checker/components/ApplicationsSection/ApplicationsSection.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"use client";
2+
13
import React from "react";
24

35
import { match } from "ts-pattern";

src/features/checker/components/EvaluationList/EvaluationList.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"use client";
2+
13
import { IconLabel } from "@/components/IconLabel";
24
import { capitalizeWord, getAddressLabel } from "@/lib/utils";
35
import { IconType } from "@/primitives/Icon";

src/features/checker/components/ProjectEvaluationAction/ProjectEvaluationAction.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"use client";
2+
13
import { useEffect, useState } from "react";
24

35
import { cn } from "@/lib/utils";

src/features/checker/components/ProjectEvaluationList/ProjectEvaluationList.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"use client";
2+
13
import { DefaultLogo } from "@/assets";
24
import { IconLabel } from "@/components/IconLabel";
35
import { CircleStat } from "@/primitives/Indicators";

src/features/checker/components/ProjectReviewList/ProjectReviewList.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"use client";
2+
13
import { match } from "ts-pattern";
24
import { Address } from "viem";
35

src/features/checker/components/ReviewDropdown/ReviewDropdown.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"use client";
2+
13
import * as React from "react";
24

35
import { tv, type VariantProps } from "tailwind-variants";

src/features/checker/components/ReviewDropdownList/ReviewDropdownList.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"use client";
2+
13
import { tv } from "tailwind-variants";
24

35
import { cn } from "@/lib/utils";

src/features/checker/components/ReviewsCounterLabel/ReviewsCounterLabel.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"use client";
2+
13
import React from "react";
24

35
import { tv } from "tailwind-variants";

src/features/checker/hooks/useApplicationEvaluations.ts

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"use client";
2+
13
import { useQuery } from "@tanstack/react-query";
24

35
import { getApplicationByIdFromIndexer } from "~checker/services/allo";

src/features/checker/hooks/useApplicationOverviewEvaluations.ts

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"use client";
2+
13
import { useCheckerContext } from "@/features/checker/store/hooks/useCheckerContext";
24

35
import { generatePoolUUID } from "~checker/utils/generatePoolUUID";

src/features/checker/hooks/useGetApplicationsFinalEvaluationPage.ts

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"use client";
2+
13
import { Address } from "viem";
24

35
import { useCheckerContext } from "@/features/checker/store/hooks/useCheckerContext";

src/features/checker/hooks/useGetApplicationsReviewPage.ts

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"use client";
2+
13
import { useCheckerContext } from "@/features/checker/store/hooks/useCheckerContext";
24

35
import { DefaultStatCardsProps } from "~checker/constants";

src/features/checker/hooks/useGetPastApplications.ts

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"use client";
2+
13
import { useQuery } from "@tanstack/react-query";
24

35
import { getPastApplicationsByApplicationIdFromIndexer } from "~checker/services/allo";

src/features/checker/hooks/useInitialize.ts

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"use client";
2+
13
import { useEffect } from "react";
24

35
import { Hex } from "viem";

src/features/checker/hooks/usePerformEvaluation.ts

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"use client";
2+
13
import { useState, useEffect } from "react";
24

35
import { useMutation } from "@tanstack/react-query";

src/features/checker/hooks/usePerformOnChainReview.ts

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"use client";
2+
13
import { useState, useEffect, useMemo } from "react";
24

35
import { useMutation } from "@tanstack/react-query";

src/features/checker/hooks/usePoolData.ts

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"use client";
2+
13
import { useEffect } from "react";
24

35
import { useQuery } from "@tanstack/react-query";

src/features/checker/pages/ApplicationEvaluationOverviewPage/ApplicationEvaluationOverviewPage.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"use client";
2+
13
import { Hex } from "viem";
24

35
import { Button } from "@/primitives/Button";
@@ -10,7 +12,7 @@ import {
1012
goToSubmitApplicationEvaluationAction,
1113
useCheckerDispatchContext,
1214
} from "~checker/store";
13-
import { PoolSummary } from "~pool/clientComponents";
15+
import { PoolSummary } from "~pool";
1416
import { ProjectBanner } from "~project";
1517

1618
export interface ApplicationEvaluationOverviewPageProps {

src/features/checker/pages/ReviewApplicationsPage/ReviewApplicationsPage.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"use client";
2+
13
import { useMemo } from "react";
24

35
import { Button } from "@/primitives/Button";
@@ -14,7 +16,7 @@ import {
1416
useCheckerDispatchContext,
1517
} from "~checker/store";
1618
import { getManagerUrl } from "~checker/utils";
17-
import { PoolSummary } from "~pool/clientComponents";
19+
import { PoolSummary } from "~pool";
1820

1921
export const ReviewApplicationsPage = () => {
2022
const { categorizedReviews, statCardsProps, poolData, poolFetchState } =

src/features/checker/pages/SubmitApplicationEvaluationPage/SubmitApplicationEvaluationModal.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"use client";
2+
13
import { useMemo } from "react";
24

35
import { match } from "ts-pattern";

src/features/checker/pages/SubmitApplicationEvaluationPage/SubmitApplicationEvaluationPage.tsx

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// src/components/SubmitApplicationEvaluation/SubmitApplicationEvaluationPage.tsx
1+
"use client";
2+
23
import { useEffect, useState } from "react";
34

45
import { useQueryClient } from "@tanstack/react-query";
@@ -17,7 +18,7 @@ import {
1718
} from "~checker/hooks";
1819
import { goToApplicationEvaluationOverviewAction, useCheckerDispatchContext } from "~checker/store";
1920
import { EvaluationStatus, EvaluationBody } from "~checker/types";
20-
import { PoolSummary } from "~pool/clientComponents";
21+
import { PoolSummary } from "~pool";
2122
import { ProjectBanner } from "~project";
2223

2324
import { SubmitApplicationEvaluationModal } from "./SubmitApplicationEvaluationModal";

src/features/checker/pages/SubmitFinalEvaluationPage/SubmitFinalEvaluationModal.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"use client";
2+
13
import { Check, X } from "lucide-react";
24

35
import { ProgressModal, Step } from "@/components/ProgressModal";

src/features/checker/pages/SubmitFinalEvaluationPage/SubmitFinalEvaluationPage.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"use client";
2+
13
import { useState, useMemo, useEffect } from "react";
24

35
import { useQueryClient } from "@tanstack/react-query";
@@ -18,7 +20,7 @@ import {
1820
} from "~checker/store";
1921
import { EvaluationAction, ReviewBody } from "~checker/types";
2022
import { getManagerUrl } from "~checker/utils";
21-
import { PoolSummary } from "~pool/clientComponents";
23+
import { PoolSummary } from "~pool";
2224

2325
import { SubmitFinalEvaluationModal } from "./SubmitFinalEvaluationModal";
2426

src/features/checker/pages/ViewApplicationEvaluationsPage/ViewApplicationEvaluationsPage.tsx

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"use client";
2+
13
import React from "react";
24

35
import { useToast } from "@/hooks/useToast";
@@ -11,7 +13,7 @@ import { ReviewDropdownList } from "~checker/components";
1113
import { useApplicationEvaluations, useGetPastApplications } from "~checker/hooks";
1214
import { getExplorerUrl } from "~checker/utils";
1315
import { ProjectBanner } from "~project";
14-
import { ProjectSummary } from "~project/clientComponents";
16+
import { ProjectSummary } from "~project";
1517

1618
export interface ViewApplicationEvaluationsPageProps {
1719
chainId: number;

src/features/checker/routers/CheckerRouter.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"use client";
2+
13
import { useEffect } from "react";
24

35
import { match, P } from "ts-pattern";

src/features/pool/clientComponents.ts

-1
This file was deleted.

src/features/pool/components/PoolBadge/PoolBadge.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"use client";
2+
13
import * as React from "react";
24

35
import { match, P } from "ts-pattern";

src/features/pool/components/PoolCard/PoolCard.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"use client";
2+
13
import { UseQueryResult } from "@tanstack/react-query";
24
import { match, P } from "ts-pattern";
35

src/features/pool/components/PoolCard/PoolDataCard.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"use client";
2+
13
import { IconLabel } from "@/components/IconLabel";
24
import { getChainInfo } from "@/lib";
35
import { IconType } from "@/primitives/Icon";

src/features/pool/components/PoolCardGroup/PoolCardGroup.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"use client";
2+
13
import { tv } from "tailwind-variants";
24

35
import { PoolCard, PoolCardProps } from "../PoolCard";

src/features/pool/components/PoolStatusBadge/PoolStatusBadge.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"use client";
2+
13
import * as React from "react";
24

35
import { tv } from "tailwind-variants";

src/features/pool/components/PoolTypeBadge/PoolTypeBadge.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"use client";
2+
13
import * as React from "react";
24

35
import { tv } from "tailwind-variants";

src/features/pool/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ export * from "./components/PoolBadge";
22
export * from "./components/PoolCard";
33
export * from "./components/PoolCardGroup";
44
export * from "./components/PoolStatusBadge";
5+
export * from "./components/PoolSummary";
56
export * from "./components/PoolTypeBadge";

src/features/program/components/ProgramCard/ProgramCard.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"use client";
2+
13
import { UseQueryResult } from "@tanstack/react-query";
24
import { match, P } from "ts-pattern";
35

0 commit comments

Comments
 (0)