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 } from "react";
import { observer } from "mobx-react-lite";
import { useParams, usePathname, useRouter } from "next/navigation";

View file

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

View file

@ -1,3 +1,5 @@
"use client";
import { useCallback, useState } from "react";
import { observer } from "mobx-react";
import Link from "next/link";
@ -205,8 +207,9 @@ const CycleIssuesHeader: React.FC = observer(() => {
{issuesCount && issuesCount > 0 ? (
<Tooltip
isMobile={isMobile}
tooltipContent={`There are ${issuesCount} ${issuesCount > 1 ? "issues" : "issue"
} in this cycle`}
tooltipContent={`There are ${issuesCount} ${
issuesCount > 1 ? "issues" : "issue"
} in this cycle`}
position="bottom"
>
<span className="flex flex-shrink-0 cursor-default items-center justify-center rounded-xl bg-custom-primary-100/20 px-2 text-center text-xs font-semibold text-custom-primary-100">

View file

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

View file

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

View file

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

View file

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

View file

@ -1,3 +1,5 @@
"use client";
import { FC, useState } from "react";
import { observer } from "mobx-react";
import { useParams } from "next/navigation";
@ -43,9 +45,7 @@ const ProjectInboxHeader: FC = observer(() => {
<Breadcrumbs.BreadcrumbItem
type="text"
link={
<BreadcrumbLink label="Inbox" icon={<LayersIcon className="h-4 w-4 text-custom-text-300" />} />
}
link={<BreadcrumbLink label="Inbox" icon={<LayersIcon className="h-4 w-4 text-custom-text-300" />} />}
/>
</Breadcrumbs>

View file

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

View file

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

View file

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

View file

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

View file

@ -1,3 +1,5 @@
"use client";
import { useCallback, useState } 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 { useParams, useRouter } from "next/navigation";
// ui

View file

@ -1,3 +1,5 @@
"use client";
import { observer } from "mobx-react";
import { CustomMenu } from "@plane/ui";
import { MODULE_VIEW_LAYOUTS } from "@/constants/module";

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 { observer } from "mobx-react";
import { useParams, useSearchParams } from "next/navigation";
import { FileText } from "lucide-react";

View file

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

View file

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

View file

@ -1,3 +1,5 @@
"use client";
import { useCallback, useRef, useState } from "react";
import { observer } from "mobx-react";
import { Search, Briefcase, X, ListFilter } from "lucide-react";

View file

@ -1,3 +1,5 @@
"use client";
import React from "react";
import Link from "next/link";
import { useParams, usePathname } from "next/navigation";
@ -43,10 +45,11 @@ const ProjectSettingsSidebar = () => {
projectMemberInfo >= link.access && (
<Link key={link.key} href={`/${workspaceSlug}/projects/${projectId}${link.href}`}>
<div
className={`rounded-md px-4 py-2 text-sm font-medium ${link.highlight(pathname, `/${workspaceSlug}/projects/${projectId}`)
className={`rounded-md px-4 py-2 text-sm font-medium ${
link.highlight(pathname, `/${workspaceSlug}/projects/${projectId}`)
? "bg-custom-primary-100/10 text-custom-primary-100"
: "text-custom-sidebar-text-200 hover:bg-custom-sidebar-background-80 focus:bg-custom-sidebar-background-80"
}`}
}`}
>
{link.label}
</div>

View file

@ -1,23 +1,4 @@
<<<<<<< HEAD:web/app/[workspaceSlug]/settings/billing/page.tsx
"use client";
=======
import { observer } from "mobx-react";
// hooks
import { Button } from "@plane/ui";
import { PageHead } from "@/components/core";
import { WorkspaceSettingHeader } from "@/components/headers";
import { MARKETING_PRICING_PAGE_LINK } from "@/constants/common";
import { EUserWorkspaceRoles } from "@/constants/workspace";
import { useUser, useWorkspace } from "@/hooks/store";
// layouts
import { AppLayout } from "@/layouts/app-layout";
import { WorkspaceSettingLayout } from "@/layouts/settings-layout";
// component
// ui
// types
import { NextPageWithLayout } from "@/lib/types";
// constants
>>>>>>> 59fdd611e4b840993e93fc53c89a75a3787f248d:web/pages/[workspaceSlug]/settings/billing.tsx
import { observer } from "mobx-react";
// ui
@ -73,4 +54,4 @@ const BillingSettingsPage = observer(() => {
);
});
export default BillingSettingsPage;
export default BillingSettingsPage;

View file

@ -11,12 +11,6 @@ import { EmptyState } from "@/components/empty-state";
import { ProfileActivityListPage } from "@/components/profile";
// constants
import { EmptyStateType } from "@/constants/empty-state";
//hooks
import { useAppTheme } from "@/hooks/store";
// layouts
import { ProfileSettingsLayout } from "@/layouts/settings-layout";
// type
import { NextPageWithLayout } from "@/lib/types";
const PER_PAGE = 100;
@ -26,8 +20,6 @@ const ProfileActivityPage = observer(() => {
const [totalPages, setTotalPages] = useState(0);
const [resultsCount, setResultsCount] = useState(0);
const [isEmpty, setIsEmpty] = useState(false);
// store hooks
const { toggleSidebar } = useAppTheme();
const updateTotalPages = (count: number) => setTotalPages(count);