fix: client component rendering

This commit is contained in:
sriram veeraghanta 2024-06-10 13:36:10 +05:30
parent 5d807db69e
commit a04fb07406
129 changed files with 944 additions and 1652 deletions

View file

@ -1,3 +1,5 @@
"use client";
import { FC, FormEvent, useMemo, useState } from "react";
import { observer } from "mobx-react-lite";
// icons

View file

@ -1,3 +1,5 @@
"use client";
import React, { useEffect, useMemo, useState } from "react";
import { observer } from "mobx-react";
import Link from "next/link";

View file

@ -1,3 +1,5 @@
"use client";
import React, { useEffect, useState } from "react";
import { CircleCheck, XCircle } from "lucide-react";
import { Button, Input, Spinner } from "@plane/ui";

View file

@ -1,3 +1,5 @@
"use client";
import React, { useState } from "react";
import { useRouter } from "next/navigation";
import { Trash2 } from "lucide-react";

View file

@ -1,3 +1,5 @@
"use client";
// nivo
import { BarDatum } from "@nivo/bar";
// components

View file

@ -1,16 +1,17 @@
"use client";
import { useParams } from "next/navigation";
import { mutate } from "swr";
import { IAnalyticsParams, IAnalyticsResponse } from "@plane/types";
// components
import { Button, Loader } from "@plane/ui";
import { AnalyticsGraph, AnalyticsTable } from "@/components/analytics";
// ui
// helpers
import { ANALYTICS } from "@/constants/fetch-keys";
import { convertResponseToBarGraphData } from "@/helpers/analytics.helper";
// types
import { IAnalyticsParams, IAnalyticsResponse } from "@plane/types";
// ui
import { Button, Loader } from "@plane/ui";
// components
import { AnalyticsGraph, AnalyticsTable } from "@/components/analytics";
// fetch-keys
import { ANALYTICS } from "@/constants/fetch-keys";
// helpers
import { convertResponseToBarGraphData } from "@/helpers/analytics.helper";
type Props = {
analytics: IAnalyticsResponse | undefined;

View file

@ -1,3 +1,5 @@
"use client";
import { observer } from "mobx-react";
// hooks
import { CustomSearchSelect } from "@plane/ui";

View file

@ -1,6 +1,7 @@
"use client";
import { useParams } from "next/navigation";
import { IAnalyticsParams, TXAxisValues } from "@plane/types";
// ui
import { CustomSelect } from "@plane/ui";

View file

@ -1,6 +1,7 @@
"use client";
import { useParams } from "next/navigation";
import { IAnalyticsParams, TXAxisValues } from "@plane/types";
// ui
import { CustomSelect } from "@plane/ui";

View file

@ -1,3 +1,5 @@
"use client";
import { observer } from "mobx-react";
import { TYAxisValues } from "@plane/types";
import { CustomSelect } from "@plane/ui";

View file

@ -1,3 +1,5 @@
"use client";
import { useEffect } from "react";
import { observer } from "mobx-react";
import { useParams } from "next/navigation";
@ -159,8 +161,8 @@ export const CustomAnalyticsSidebar: React.FC<Props> = observer((props) => {
(cycleId
? cycleDetails?.created_at
: moduleId
? moduleDetails?.created_at
: projectDetails?.created_at) ?? ""
? moduleDetails?.created_at
: projectDetails?.created_at) ?? ""
)}
</div>
)}

View file

@ -1,5 +1,6 @@
import { BarDatum } from "@nivo/bar";
"use client";
import { BarDatum } from "@nivo/bar";
// icons
import { IAnalyticsParams, IAnalyticsResponse, TIssuePriorities } from "@plane/types";
import { PriorityIcon } from "@plane/ui";

View file

@ -1,14 +1,13 @@
"use client";
import { useParams } from "next/navigation";
import useSWR from "swr";
// services
// components
import { Button, Loader } from "@plane/ui";
import { AnalyticsDemand, AnalyticsLeaderBoard, AnalyticsScope, AnalyticsYearWiseIssues } from "@/components/analytics";
// ui
import { Button, Loader } from "@plane/ui";
// components
import { AnalyticsDemand, AnalyticsLeaderBoard, AnalyticsScope, AnalyticsYearWiseIssues } from "@/components/analytics";
// fetch-keys
import { DEFAULT_ANALYTICS } from "@/constants/fetch-keys";
// services
import { AnalyticsService } from "@/services/analytics.service";
type Props = {

View file

@ -1,3 +1,5 @@
"use client";
import { useState, FC } from "react";
import { useParams } from "next/navigation";
import { mutate } from "swr";

View file

@ -1,3 +1,5 @@
"use client";
import React from "react";
import Image from "next/image";
// ui

View file

@ -1,3 +1,5 @@
"use client";
import React, { useState } from "react";
import { useParams } from "next/navigation";
import { mutate } from "swr";

View file

@ -1,3 +1,5 @@
"use client";
import { useState } from "react";
import { add } from "date-fns";
import { Controller, useForm } from "react-hook-form";

View file

@ -1,3 +1,5 @@
"use client";
import { Copy } from "lucide-react";
import { IApiToken } from "@plane/types";
// ui

View file

@ -1,3 +1,5 @@
"use client";
import { useState } from "react";
import { XCircle } from "lucide-react";
import { IApiToken } from "@plane/types";

View file

@ -1,9 +1,10 @@
import Link from "next/link";
"use client";
// layouts
import { Button } from "@plane/ui";
import DefaultLayout from "@/layouts/default-layout";
import Link from "next/link";
// ui
import { Button } from "@plane/ui";
// layouts
import DefaultLayout from "@/layouts/default-layout";
export const NotAWorkspaceMember = () => (
<DefaultLayout>

View file

@ -1,16 +1,18 @@
"use client";
import React, { useState } from "react";
import { observer } from "mobx-react";
// hooks
// component
import { ArchiveRestore } from "lucide-react";
// types
import { IProject } from "@plane/types";
// ui
import { CustomSelect, Loader, ToggleSwitch } from "@plane/ui";
// component
import { SelectMonthModal } from "@/components/automation";
// icon
// constants
import { EUserProjectRoles, PROJECT_AUTOMATION_MONTHS } from "@/constants/project";
// hooks
import { useProject, useUser } from "@/hooks/store";
// types
type Props = {
handleChange: (formData: Partial<IProject>) => Promise<void>;

View file

@ -1,16 +1,19 @@
"use client";
import React, { useState } from "react";
import { observer } from "mobx-react";
// hooks
import { ArchiveX } from "lucide-react";
import { IProject } from "@plane/types";
import { CustomSelect, CustomSearchSelect, ToggleSwitch, StateGroupIcon, DoubleCircleIcon, Loader } from "@plane/ui";
import { SelectMonthModal } from "@/components/automation";
import { EUserProjectRoles, PROJECT_AUTOMATION_MONTHS } from "@/constants/project";
import { useProject, useProjectState, useUser } from "@/hooks/store";
// component
// icons
import { ArchiveX } from "lucide-react";
// types
import { IProject } from "@plane/types";
// ui
import { CustomSelect, CustomSearchSelect, ToggleSwitch, StateGroupIcon, DoubleCircleIcon, Loader } from "@plane/ui";
// component
import { SelectMonthModal } from "@/components/automation";
// constants
import { EUserProjectRoles, PROJECT_AUTOMATION_MONTHS } from "@/constants/project";
// hooks
import { useProject, useProjectState, useUser } from "@/hooks/store";
type Props = {
handleChange: (formData: Partial<IProject>) => Promise<void>;

View file

@ -1,3 +1,5 @@
"use client";
import React from "react";
import { useParams } from "next/navigation";
// react-hook-form

View file

@ -1,3 +1,5 @@
"use client";
import { Command } from "cmdk";
import { ContrastIcon, FileText } from "lucide-react";
// hooks

View file

@ -1,3 +1,5 @@
"use client";
// types
import { Briefcase, FileText, LayoutGrid } from "lucide-react";
import {

View file

@ -1,3 +1,5 @@
"use client";
import Link from "next/link";
import { Tooltip } from "@plane/ui";
import { usePlatformOS } from "@/hooks/use-platform-os";

View file

@ -1,3 +1,5 @@
"use client";
import { FC } from "react";
// emoji-picker-react
import { Emoji } from "emoji-picker-react";

View file

@ -1,3 +1,5 @@
"use client";
import { useEffect } from "react";
import { observer } from "mobx-react";
import { useParams } from "next/navigation";

View file

@ -1,3 +1,5 @@
"use client";
import React, { useEffect, useState, useRef, useCallback } from "react";
import { observer } from "mobx-react";
import Image from "next/image";

View file

@ -1,3 +1,5 @@
"use client";
import React, { useState } from "react";
import { observer } from "mobx-react";
import { useParams } from "next/navigation";

View file

@ -1,3 +1,5 @@
"use client";
import React, { useEffect, useState } from "react";
import { Rocket, Search, X } from "lucide-react";
import { Combobox, Dialog, Transition } from "@headlessui/react";

View file

@ -1,3 +1,5 @@
"use client";
import React, { useEffect, useState, useRef, Fragment, Ref } from "react";
import { Placement } from "@popperjs/core";
import { useParams } from "next/navigation";

View file

@ -1,5 +1,6 @@
import { FC, useEffect, Fragment } from "react";
"use client";
import { FC, useEffect, Fragment } from "react";
// react-hook-form
import { Controller, useForm } from "react-hook-form";
// headless ui

View file

@ -1,3 +1,5 @@
"use client";
import React, { useState } from "react";
import { observer } from "mobx-react";
import { useDropzone } from "react-dropzone";

View file

@ -1,3 +1,4 @@
"use client";
import React, { useState } from "react";
import { observer } from "mobx-react";
import { useParams, usePathname } from "next/navigation";

View file

@ -1,3 +1,5 @@
"use client";
import { Ref, useState } from "react";
import { usePopper } from "react-popper";
import { Popover } from "@headlessui/react";

View file

@ -1,3 +1,5 @@
"use client";
import React, { FC, useState, useRef, useEffect } from "react";
import { observer } from "mobx-react-lite";
import { useParams } from "next/navigation";
@ -28,9 +30,6 @@ import { renderFormattedPayloadDate, getDate } from "@/helpers/date-time.helper"
import { getChangedIssuefields, getDescriptionPlaceholder } from "@/helpers/issue.helper";
import { shouldRenderProject } from "@/helpers/project.helper";
// hooks
<<<<<<< HEAD
import { useAppRouter, useEstimate, useInstance, useIssueDetail, useProject, useWorkspace } from "@/hooks/store";
=======
import {
useAppRouter,
useProjectEstimates,
@ -39,7 +38,6 @@ import {
useProject,
useWorkspace,
} from "@/hooks/store";
>>>>>>> 59fdd611e4b840993e93fc53c89a75a3787f248d
import useKeypress from "@/hooks/use-keypress";
import { useProjectIssueProperties } from "@/hooks/use-project-issue-properties";
// services

View file

@ -1,3 +1,5 @@
"use client";
import React, { useEffect, useRef, useState } from "react";
import { observer } from "mobx-react-lite";
import { usePathname } from "next/navigation";

View file

@ -1,3 +1,5 @@
"use client";
import { FC } from "react";
import { observer } from "mobx-react";
import Link from "next/link";

View file

@ -1,3 +1,5 @@
"use client";
import { useMemo } from "react";
// hooks
import { TOAST_TYPE, setPromiseToast, setToast } from "@plane/ui";

View file

@ -1,3 +1,5 @@
"use client";
import { FC, useEffect, useState, useMemo } from "react";
import { observer } from "mobx-react";
import { usePathname } from "next/navigation";

View file

@ -1,3 +1,5 @@
"use client";
import React from "react";
import { observer } from "mobx-react";
import { ChevronRight, X, Pencil, Trash, Link as LinkIcon, Loader } from "lucide-react";

View file

@ -1,3 +1,5 @@
"use client";
import { FC, useCallback, useEffect, useMemo, useState } from "react";
import { observer } from "mobx-react";
import { usePathname } from "next/navigation";

View file

@ -1,3 +1,5 @@
"use client";
import React, { useEffect } from "react";
import { observer } from "mobx-react";
import { useParams } from "next/navigation";

View file

@ -1,3 +1,5 @@
"use client";
import { observer } from "mobx-react-lite";
import { X } from "lucide-react";
// ui

View file

@ -1,3 +1,5 @@
"use client";
import { X } from "lucide-react";
// types
import { TProjectAppliedDisplayFilterKeys, TProjectFilters } from "@plane/types";

View file

@ -1,3 +1,5 @@
"use client";
import { useMemo, useState } from "react";
import sortBy from "lodash/sortBy";
import { observer } from "mobx-react-lite";

View file

@ -1,3 +1,5 @@
"use client";
import { useMemo, useState } from "react";
import sortBy from "lodash/sortBy";
import { observer } from "mobx-react-lite";

View file

@ -1,3 +1,5 @@
"use client";
import { ArrowDownWideNarrow, Check, ChevronDown } from "lucide-react";
import { TProjectOrderByOptions } from "@plane/types";
// ui

View file

@ -1,3 +1,5 @@
"use client";
import React, { FC } from "react";
import { observer } from "mobx-react";
import Link from "next/link";

View file

@ -1,3 +1,5 @@
"use client";
import { useEffect } from "react";
import { observer } from "mobx-react";
import { useParams } from "next/navigation";

View file

@ -1,3 +1,5 @@
"use client";
import { useState, Fragment } from "react";
import { useRouter } from "next/navigation";
import { Dialog, Transition } from "@headlessui/react";
@ -8,6 +10,7 @@ import { useProject } from "@/hooks/store";
type Props = {
workspaceSlug: string;
projectId: string;
isOpen: boolean;
onClose: () => void;

View file

@ -1,3 +1,5 @@
"use client";
import React from "react";
import { ChevronRight, ChevronUp } from "lucide-react";
import { Disclosure, Transition } from "@headlessui/react";

View file

@ -1,3 +1,5 @@
"use client";
import React from "react";
import { ChevronRight, ChevronUp } from "lucide-react";
import { Disclosure, Transition } from "@headlessui/react";

View file

@ -1,3 +1,5 @@
"use client";
import { FC } from "react";
import { observer } from "mobx-react";
import { FileText, Inbox } from "lucide-react";

View file

@ -1,3 +1,5 @@
"use client";
import { useEffect, useRef, useState } from "react";
import { combine } from "@atlaskit/pragmatic-drag-and-drop/combine";
import { draggable, dropTargetForElements } from "@atlaskit/pragmatic-drag-and-drop/element/adapter";

View file

@ -1,3 +1,5 @@
"use client";
import React from "react";
import { observer } from "mobx-react";
import { useParams } from "next/navigation";

View file

@ -1,3 +1,5 @@
"use client";
import React, { useEffect } from "react";
import { observer } from "mobx-react";
import { useParams } from "next/navigation";

View file

@ -1,3 +1,5 @@
"use client";
import React, { useState } from "react";
import { observer } from "mobx-react";
import { useParams } from "next/navigation";

View file

@ -1,3 +1,5 @@
"use client";
import { useState } from "react";
import { observer } from "mobx-react";
import { useParams } from "next/navigation";

View file

@ -1,3 +1,5 @@
"use client";
import React, { useState } from "react";
import { observer } from "mobx-react";
import { useParams } from "next/navigation";

View file

@ -1,3 +1,5 @@
"use client";
import { FC } from "react";
// ui
import { IIssueLabel } from "@plane/types";

View file

@ -1,3 +1,5 @@
"use client";
import React from "react";
// ui
import { Loader } from "@plane/ui";

View file

@ -1,3 +1,5 @@
"use client";
import React, { useState } from "react";
import { observer } from "mobx-react";
import { useParams } from "next/navigation";

View file

@ -1,3 +1,5 @@
"use client";
import { useEffect, useState } from "react";
import { observer } from "mobx-react";
import { Controller, useForm } from "react-hook-form";

View file

@ -1,3 +1,5 @@
"use client";
import { FC } from "react";
import { observer } from "mobx-react";
// types

View file

@ -1,3 +1,5 @@
"use client";
import { useState } from "react";
import { observer } from "mobx-react";
import { ExternalLink, Link, Pencil, Trash2 } from "lucide-react";

View file

@ -1,3 +1,5 @@
"use client";
import { FC, useRef, useState } from "react";
import { observer } from "mobx-react-lite";
import { useParams } from "next/navigation";

View file

@ -1,3 +1,5 @@
"use client";
import React, { useState } from "react";
import { useParams } from "next/navigation";
// types

View file

@ -1,3 +1,5 @@
"use client";
import React, { FC, useState } from "react";
import { useParams, useRouter } from "next/navigation";
// ui

View file

@ -1,3 +1,5 @@
"use client";
import React from "react";
import Image from "next/image";
// ui

View file

@ -1,3 +1,5 @@
"use client";
import { ChevronDown, ChevronUp } from "lucide-react";
import { Disclosure, Transition } from "@headlessui/react";
import { Button } from "@plane/ui";

View file

@ -1,3 +1,5 @@
"use client";
import React, { FC, useEffect, useState } from "react";
import { observer } from "mobx-react";
import { Controller, useForm } from "react-hook-form";

View file

@ -1,3 +1,5 @@
"use client";
import { Input } from "@plane/ui";
type Props = {

View file

@ -1,3 +1,5 @@
"use client";
import { useState, FC } from "react";
import { observer } from "mobx-react";
import { useParams } from "next/navigation";

View file

@ -1,3 +1,5 @@
"use client";
import { Control, Controller } from "react-hook-form";
import { IWebhook } from "@plane/types";
// ui

View file

@ -1,3 +1,5 @@
"use client";
import { FC } from "react";
import Link from "next/link";
import { useParams } from "next/navigation";

View file

@ -1,3 +1,5 @@
"use client";
import React, { useState } from "react";
import { observer } from "mobx-react";
import { AlertTriangle } from "lucide-react";
@ -91,8 +93,8 @@ export const ConfirmWorkspaceMemberRemove: React.FC<Props> = observer((props) =>
? "Leaving"
: "Leave"
: isRemoving
? "Removing"
: "Remove"}
? "Removing"
: "Remove"}
</Button>
</div>
</Dialog.Panel>

View file

@ -1,3 +1,5 @@
"use client";
import React, { useState } from "react";
import { observer } from "mobx-react-lite";
import { AlertTriangle } from "lucide-react";
@ -102,8 +104,8 @@ export const ConfirmWorkspaceMemberRemove: React.FC<Props> = observer((props) =>
? "Leaving"
: "Leave"
: isRemoving
? "Removing"
: "Remove"}
? "Removing"
: "Remove"}
</Button>
</div>
</Dialog.Panel>

View file

@ -1,3 +1,5 @@
"use client";
import { Dispatch, SetStateAction, useEffect, useState, FC } from "react";
import { observer } from "mobx-react";
import { useRouter } from "next/navigation";

View file

@ -1,3 +1,5 @@
"use client";
import React from "react";
import { observer } from "mobx-react";
import { useRouter } from "next/navigation";

View file

@ -1,3 +1,5 @@
"use client";
import React, { useRef, useState } from "react";
import { observer } from "mobx-react";
import Link from "next/link";

View file

@ -1,3 +1,5 @@
"use client";
import React, { useEffect } from "react";
import { observer } from "mobx-react";
import { Controller, useFieldArray, useForm } from "react-hook-form";

View file

@ -1,3 +1,5 @@
"use client";
import { FC, useState } from "react";
import { observer } from "mobx-react";
import Link from "next/link";

View file

@ -1,3 +1,5 @@
"use client";
import { useEffect, useState, FC } from "react";
import { observer } from "mobx-react";
import { Controller, useForm } from "react-hook-form";

View file

@ -1,3 +1,5 @@
"use client";
import { Fragment, Ref, useState } from "react";
import { observer } from "mobx-react";
import Link from "next/link";

View file

@ -1,3 +1,5 @@
"use client";
import React from "react";
import { observer } from "mobx-react";
import Link from "next/link";

View file

@ -1,3 +1,5 @@
"use client";
import { observer } from "mobx-react";
import Link from "next/link";
import { ExternalLink, LinkIcon } from "lucide-react";

View file

@ -1,3 +1,5 @@
"use client";
import React, { useState } from "react";
import { observer } from "mobx-react";
import { useParams } from "next/navigation";

View file

@ -1,3 +1,5 @@
"use client";
import { useEffect } from "react";
import { observer } from "mobx-react";
import { Controller, useForm } from "react-hook-form";

View file

@ -1,3 +1,5 @@
"use client";
import React from "react";
import { observer } from "mobx-react";
import { useParams, useRouter } from "next/navigation";

View file

@ -1,3 +1,5 @@
"use client";
import { useState } from "react";
import { observer } from "mobx-react";
import Link from "next/link";

View file

@ -1,3 +1,5 @@
"use client";
import { useState } from "react";
import { observer } from "mobx-react";
import Link from "next/link";

View file

@ -1,3 +1,5 @@
"use client";
import React from "react";
import { observer } from "mobx-react";
import Image from "next/image";