fix: remove unused imports and variables (part 2 — web/core non-issues) (#8752)

* fix: remove unused imports and variables (part 2)

Resolve oxlint no-unused-vars warnings in apps/web/core/
(excluding components/issues/).

* fix: resolve CI check failures

* fix: resolve check:types failures
This commit is contained in:
darkingtail 2026-03-25 04:18:01 +08:00 committed by sriram veeraghanta
parent d9695afcdc
commit 04d4490293
118 changed files with 72 additions and 167 deletions

View file

@ -4,7 +4,7 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC, FormEvent } from "react"; import type { FormEvent } from "react";
import { useMemo, useRef, useState } from "react"; import { useMemo, useRef, useState } from "react";
import { observer } from "mobx-react"; import { observer } from "mobx-react";
// icons // icons

View file

@ -10,7 +10,7 @@ import Link from "next/link";
// icons // icons
import { Eye, EyeOff, Info, XCircle } from "lucide-react"; import { Eye, EyeOff, Info, XCircle } from "lucide-react";
// plane imports // plane imports
import { API_BASE_URL, E_PASSWORD_STRENGTH, AUTH_TRACKER_EVENTS, AUTH_TRACKER_ELEMENTS } from "@plane/constants"; import { API_BASE_URL, E_PASSWORD_STRENGTH, AUTH_TRACKER_ELEMENTS } from "@plane/constants";
import { useTranslation } from "@plane/i18n"; import { useTranslation } from "@plane/i18n";
import { Button } from "@plane/propel/button"; import { Button } from "@plane/propel/button";
import { CloseIcon } from "@plane/propel/icons"; import { CloseIcon } from "@plane/propel/icons";

View file

@ -41,7 +41,7 @@ const defaultValues: TUniqueCodeFormValues = {
}; };
export function AuthUniqueCodeForm(props: TAuthUniqueCodeForm) { export function AuthUniqueCodeForm(props: TAuthUniqueCodeForm) {
const { mode, email, handleEmailClear, generateEmailUniqueCode, isExistingEmail, nextPath } = props; const { mode, email, handleEmailClear, generateEmailUniqueCode, nextPath } = props;
// derived values // derived values
const defaultResetTimerValue = 5; const defaultResetTimerValue = 5;
// states // states

View file

@ -16,7 +16,7 @@ type Props = {
}; };
function AnalyticsSectionWrapper(props: Props) { function AnalyticsSectionWrapper(props: Props) {
const { title, children, className, subtitle, actions, headerClassName } = props; const { title, children, className, actions, headerClassName } = props;
return ( return (
<div className={className}> <div className={className}>
<div className={cn("mb-6 flex items-center gap-2 text-nowrap", headerClassName)}> <div className={cn("mb-6 flex items-center gap-2 text-nowrap", headerClassName)}>

View file

@ -38,10 +38,10 @@ interface DataTableProps<TData, TValue> {
} }
export function DataTable<TData, TValue>({ columns, data, searchPlaceholder, actions }: DataTableProps<TData, TValue>) { export function DataTable<TData, TValue>({ columns, data, searchPlaceholder, actions }: DataTableProps<TData, TValue>) {
const [rowSelection, setRowSelection] = React.useState({}); const [rowSelection, _setRowSelection] = React.useState({});
const [columnVisibility, setColumnVisibility] = React.useState<VisibilityState>({}); const [columnVisibility, setColumnVisibility] = React.useState<VisibilityState>({});
const [columnFilters, setColumnFilters] = React.useState<ColumnFiltersState>([]); const [columnFilters, setColumnFilters] = React.useState<ColumnFiltersState>([]);
const [sorting, setSorting] = React.useState<SortingState>([]); const [sorting, _setSorting] = React.useState<SortingState>([]);
const { t } = useTranslation(); const { t } = useTranslation();
const inputRef = React.useRef<HTMLInputElement>(null); const inputRef = React.useRef<HTMLInputElement>(null);
const [isSearchOpen, setIsSearchOpen] = React.useState(false); const [isSearchOpen, setIsSearchOpen] = React.useState(false);

View file

@ -31,6 +31,7 @@ import { ChartLoader } from "../loaders";
import { generateBarColor } from "./utils"; import { generateBarColor } from "./utils";
declare module "@tanstack/react-table" { declare module "@tanstack/react-table" {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
interface ColumnMeta<TData extends RowData, TValue> { interface ColumnMeta<TData extends RowData, TValue> {
export: { export: {
key: string; key: string;

View file

@ -29,6 +29,7 @@ import { InsightTable } from "../insight-table";
const analyticsService = new AnalyticsService(); const analyticsService = new AnalyticsService();
declare module "@tanstack/react-table" { declare module "@tanstack/react-table" {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
interface ColumnMeta<TData extends RowData, TValue> { interface ColumnMeta<TData extends RowData, TValue> {
export: { export: {
key: string; key: string;

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
import { observer } from "mobx-react"; import { observer } from "mobx-react";
import Link from "next/link"; import Link from "next/link";
import { useParams, usePathname } from "next/navigation"; import { useParams, usePathname } from "next/navigation";

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
import { useRef, useState } from "react"; import { useRef, useState } from "react";
import { observer } from "mobx-react"; import { observer } from "mobx-react";
import { useForm, Controller } from "react-hook-form"; import { useForm, Controller } from "react-hook-form";

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
import { useMemo, useState } from "react"; import { useMemo, useState } from "react";
import { observer } from "mobx-react"; import { observer } from "mobx-react";
// plane imports // plane imports
@ -12,7 +11,6 @@ import { stringToEmoji } from "@plane/propel/emoji-icon-picker";
import { EmojiReactionGroup, EmojiReactionPicker } from "@plane/propel/emoji-reaction"; import { EmojiReactionGroup, EmojiReactionPicker } from "@plane/propel/emoji-reaction";
import type { EmojiReactionType } from "@plane/propel/emoji-reaction"; import type { EmojiReactionType } from "@plane/propel/emoji-reaction";
import type { TCommentsOperations, TIssueComment } from "@plane/types"; import type { TCommentsOperations, TIssueComment } from "@plane/types";
import { cn } from "@plane/utils";
// helpers // helpers
// local imports // local imports

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
import { observer } from "mobx-react"; import { observer } from "mobx-react";
import type { TProjectActivity } from "@/plane-web/types"; import type { TProjectActivity } from "@/plane-web/types";
@ -18,7 +17,7 @@ type TActivityItem = {
}; };
export const ActivityItem = observer(function ActivityItem(props: TActivityItem) { export const ActivityItem = observer(function ActivityItem(props: TActivityItem) {
const { activity, showProject = true, ends } = props; const { activity, ends } = props;
if (!activity) return null; if (!activity) return null;

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
import { observer } from "mobx-react"; import { observer } from "mobx-react";
import Link from "next/link"; import Link from "next/link";
// types // types

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
// //
import { cn } from "@plane/utils"; import { cn } from "@plane/utils";

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
import { Crown } from "lucide-react"; import { Crown } from "lucide-react";
// helpers // helpers
import { cn } from "@plane/utils"; import { cn } from "@plane/utils";

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
import React from "react"; import React from "react";
import { Row, ERowVariant } from "@plane/ui"; import { Row, ERowVariant } from "@plane/ui";

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
// plane imports // plane imports
import type { I_THEME_OPTION } from "@plane/constants"; import type { I_THEME_OPTION } from "@plane/constants";
import { THEME_OPTIONS } from "@plane/constants"; import { THEME_OPTIONS } from "@plane/constants";

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
import { Fragment, useCallback, useRef, useState } from "react"; import { Fragment, useCallback, useRef, useState } from "react";
import { isEmpty } from "lodash-es"; import { isEmpty } from "lodash-es";
import { observer } from "mobx-react"; import { observer } from "mobx-react";

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
import { Fragment } from "react"; import { Fragment } from "react";
import { observer } from "mobx-react"; import { observer } from "mobx-react";
import Link from "next/link"; import Link from "next/link";

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
import { observer } from "mobx-react"; import { observer } from "mobx-react";
import { useTheme } from "next-themes"; import { useTheme } from "next-themes";
// plane imports // plane imports

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
import { useMemo } from "react"; import { useMemo } from "react";
import { isEmpty } from "lodash-es"; import { isEmpty } from "lodash-es";
import { observer } from "mobx-react"; import { observer } from "mobx-react";

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
import React from "react"; import React from "react";
import { isEmpty } from "lodash-es"; import { isEmpty } from "lodash-es";
import { observer } from "mobx-react"; import { observer } from "mobx-react";

View file

@ -76,7 +76,7 @@ export const CycleSidebarHeader = observer(function CycleSidebarHeader(props: Pr
try { try {
const res = await cycleService.cycleDateCheck(workspaceSlug, projectId, payload); const res = await cycleService.cycleDateCheck(workspaceSlug, projectId, payload);
return res.status; return res.status;
} catch (err) { } catch (_err) {
return false; return false;
} }
}; };

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
import { observer } from "mobx-react"; import { observer } from "mobx-react";
// assets // assets
import AllFiltersImage from "@/app/assets/empty-state/cycle/all-filters.svg?url"; import AllFiltersImage from "@/app/assets/empty-state/cycle/all-filters.svg?url";

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
import { observer } from "mobx-react"; import { observer } from "mobx-react";
// components // components
import { useTranslation } from "@plane/i18n"; import { useTranslation } from "@plane/i18n";

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
import React from "react"; import React from "react";
// types // types
import { CycleGroupIcon, ChevronDownIcon } from "@plane/propel/icons"; import { CycleGroupIcon, ChevronDownIcon } from "@plane/propel/icons";

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
import React from "react"; import React from "react";
import { observer } from "mobx-react"; import { observer } from "mobx-react";
import { Logo } from "@plane/propel/emoji-icon-picker"; import { Logo } from "@plane/propel/emoji-icon-picker";

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
import React from "react"; import React from "react";
import { observer } from "mobx-react"; import { observer } from "mobx-react";
import { Disclosure } from "@headlessui/react"; import { Disclosure } from "@headlessui/react";

View file

@ -50,7 +50,7 @@ export function CycleCreateUpdateModal(props: CycleModalProps) {
const selectedProjectId = payload.project_id ?? projectId.toString(); const selectedProjectId = payload.project_id ?? projectId.toString();
await createCycle(workspaceSlug, selectedProjectId, payload) await createCycle(workspaceSlug, selectedProjectId, payload)
.then((res) => { .then((_res) => {
// mutate when the current cycle creation is active // mutate when the current cycle creation is active
if (payload.start_date && payload.end_date) { if (payload.start_date && payload.end_date) {
const currentDate = new Date(); const currentDate = new Date();
@ -81,7 +81,7 @@ export function CycleCreateUpdateModal(props: CycleModalProps) {
const selectedProjectId = payload.project_id ?? projectId.toString(); const selectedProjectId = payload.project_id ?? projectId.toString();
await updateCycleDetails(workspaceSlug, selectedProjectId, cycleId, payload) await updateCycleDetails(workspaceSlug, selectedProjectId, cycleId, payload)
.then((res) => { .then((_res) => {
setToast({ setToast({
type: TOAST_TYPE.SUCCESS, type: TOAST_TYPE.SUCCESS,
title: "Success!", title: "Success!",

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
import { cn } from "@plane/utils"; import { cn } from "@plane/utils";
type Props = { type Props = {

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
import { useEffect, useMemo, useState } from "react"; import { useEffect, useMemo, useState } from "react";
import { observer } from "mobx-react"; import { observer } from "mobx-react";
// plane imports // plane imports

View file

@ -48,7 +48,7 @@ export const DeleteEstimateModal = observer(function DeleteEstimateModal(props:
message: "Estimate has been removed from your project.", message: "Estimate has been removed from your project.",
}); });
handleClose(); handleClose();
} catch (error) { } catch (_error) {
setButtonLoader(false); setButtonLoader(false);
setToast({ setToast({
type: TOAST_TYPE.ERROR, type: TOAST_TYPE.ERROR,

View file

@ -44,7 +44,7 @@ export const EstimateDisableSwitch = observer(function EstimateDisableSwitch(pro
? t("project_settings.estimates.toasts.disabled.success.message") ? t("project_settings.estimates.toasts.disabled.success.message")
: t("project_settings.estimates.toasts.enabled.success.message"), : t("project_settings.estimates.toasts.enabled.success.message"),
}); });
} catch (err) { } catch (_err) {
setToast({ setToast({
type: TOAST_TYPE.ERROR, type: TOAST_TYPE.ERROR,
title: t("project_settings.estimates.toasts.disabled.error.title"), title: t("project_settings.estimates.toasts.disabled.error.title"),

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
import { observer } from "mobx-react"; import { observer } from "mobx-react";
// local imports // local imports
import { EstimateListItem } from "./estimate-list-item"; import { EstimateListItem } from "./estimate-list-item";

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
import { observer } from "mobx-react"; import { observer } from "mobx-react";
export const EstimateSearch = observer(function EstimateSearch() { export const EstimateSearch = observer(function EstimateSearch() {

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
import { useTranslation } from "@plane/i18n"; import { useTranslation } from "@plane/i18n";
type TEstimateNumberInputProps = { type TEstimateNumberInputProps = {
value?: number; value?: number;

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
// plane imports // plane imports
import type { TEstimateSystemKeys } from "@plane/types"; import type { TEstimateSystemKeys } from "@plane/types";
import { EEstimateSystem } from "@plane/types"; import { EEstimateSystem } from "@plane/types";

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
import { useTranslation } from "@plane/i18n"; import { useTranslation } from "@plane/i18n";
type TEstimateTextInputProps = { type TEstimateTextInputProps = {
value?: string; value?: string;

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
import { Loader } from "@plane/ui"; import { Loader } from "@plane/ui";
export function EstimateLoaderScreen() { export function EstimateLoaderScreen() {

View file

@ -4,7 +4,7 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { Dispatch, FC, SetStateAction } from "react"; import type { Dispatch, SetStateAction } from "react";
import { useCallback, useState } from "react"; import { useCallback, useState } from "react";
import { observer } from "mobx-react"; import { observer } from "mobx-react";
// plane imports // plane imports

View file

@ -166,12 +166,6 @@ export const EstimatePointCreate = observer(function EstimatePointCreate(props:
handleEstimatePointError(estimateInputValue, t("project_settings.estimates.validation.empty")); handleEstimatePointError(estimateInputValue, t("project_settings.estimates.validation.empty"));
}; };
// derived values
const inputProps = {
type: "text",
maxlength: MAX_ESTIMATE_POINT_INPUT_LENGTH,
};
return ( return (
<form onSubmit={handleCreate} className="relative flex items-center gap-2 pr-2.5 text-14"> <form onSubmit={handleCreate} className="relative flex items-center gap-2 pr-2.5 text-14">
<div <div

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
import { useEffect, useRef, useState } from "react"; import { useEffect, useRef, useState } from "react";
import { observer } from "mobx-react"; import { observer } from "mobx-react";
import { GripVertical } from "lucide-react"; import { GripVertical } from "lucide-react";

View file

@ -124,7 +124,7 @@ export const ExportForm = observer(function ExportForm(props: Props) {
: "", : "",
}), }),
}); });
} catch (error) { } catch (_error) {
setExportLoading(false); setExportLoading(false);
setToast({ setToast({
type: TOAST_TYPE.ERROR, type: TOAST_TYPE.ERROR,

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
import { useState } from "react"; import { useState } from "react";
// ui // ui
import { Button } from "@plane/propel/button"; import { Button } from "@plane/propel/button";

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
import { useEffect, useState } from "react"; import { useEffect, useState } from "react";
import { observer } from "mobx-react"; import { observer } from "mobx-react";
import { createPortal } from "react-dom"; import { createPortal } from "react-dom";

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
import { useEffect } from "react"; import { useEffect } from "react";
import { observer } from "mobx-react"; import { observer } from "mobx-react";
// components // components

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
// plane types // plane types
import { useTranslation } from "@plane/i18n"; import { useTranslation } from "@plane/i18n";
import type { IUser } from "@plane/types"; import type { IUser } from "@plane/types";

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
import { useEffect } from "react"; import { useEffect } from "react";
import { observer } from "mobx-react"; import { observer } from "mobx-react";
import { Controller, useForm } from "react-hook-form"; import { Controller, useForm } from "react-hook-form";

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
import { observer } from "mobx-react"; import { observer } from "mobx-react";
// computed // computed
import { ContentOverflowWrapper } from "@/components/core/content-overflow-HOC"; import { ContentOverflowWrapper } from "@/components/core/content-overflow-HOC";

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
import { observer } from "mobx-react"; import { observer } from "mobx-react";
// plane types // plane types
// plane ui // plane ui

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
import React from "react"; import React from "react";
import { observer } from "mobx-react"; import { observer } from "mobx-react";
// ui // ui

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
import React, { useEffect, useRef, useState } from "react"; import React, { useEffect, useRef, useState } from "react";
import { combine } from "@atlaskit/pragmatic-drag-and-drop/combine"; import { combine } from "@atlaskit/pragmatic-drag-and-drop/combine";
import type { import type {
@ -21,7 +20,7 @@ import { useParams } from "next/navigation";
import { createRoot } from "react-dom/client"; import { createRoot } from "react-dom/client";
// plane types // plane types
import { useTranslation } from "@plane/i18n"; import { useTranslation } from "@plane/i18n";
import type { InstructionType, TWidgetEntityData } from "@plane/types"; import type { InstructionType } from "@plane/types";
// plane ui // plane ui
import { DropIndicator, ToggleSwitch } from "@plane/ui"; import { DropIndicator, ToggleSwitch } from "@plane/ui";
// plane utils // plane utils

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
import { observer } from "mobx-react"; import { observer } from "mobx-react";
import { useTranslation } from "@plane/i18n"; import { useTranslation } from "@plane/i18n";
import { ChevronDownIcon } from "@plane/propel/icons"; import { ChevronDownIcon } from "@plane/propel/icons";

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
import { useCallback, useEffect, useState } from "react"; import { useCallback, useEffect, useState } from "react";
import { observer } from "mobx-react"; import { observer } from "mobx-react";
import { CircleCheck, CircleX, Clock, FileStack, MoveRight } from "lucide-react"; import { CircleCheck, CircleX, Clock, FileStack, MoveRight } from "lucide-react";

View file

@ -117,7 +117,7 @@ export const InboxIssueMainContent = observer(function InboxIssueMainContent(pro
update: async (_workspaceSlug: string, _projectId: string, _issueId: string, data: Partial<TIssue>) => { update: async (_workspaceSlug: string, _projectId: string, _issueId: string, data: Partial<TIssue>) => {
try { try {
await inboxIssue.updateIssue(data); await inboxIssue.updateIssue(data);
} catch (error) { } catch (_error) {
setToast({ setToast({
title: "Work item update failed", title: "Work item update failed",
type: TOAST_TYPE.ERROR, type: TOAST_TYPE.ERROR,

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
import { observer } from "mobx-react"; import { observer } from "mobx-react";
import { PAST_DURATION_FILTER_OPTIONS } from "@plane/constants"; import { PAST_DURATION_FILTER_OPTIONS } from "@plane/constants";
import { CloseIcon } from "@plane/propel/icons"; import { CloseIcon } from "@plane/propel/icons";

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
import { observer } from "mobx-react"; import { observer } from "mobx-react";
// hooks // hooks
import { CloseIcon } from "@plane/propel/icons"; import { CloseIcon } from "@plane/propel/icons";

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
import { observer } from "mobx-react"; import { observer } from "mobx-react";
// plane types // plane types

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
import { observer } from "mobx-react"; import { observer } from "mobx-react";
import { ISSUE_PRIORITIES } from "@plane/constants"; import { ISSUE_PRIORITIES } from "@plane/constants";
import { useTranslation } from "@plane/i18n"; import { useTranslation } from "@plane/i18n";

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
import { observer } from "mobx-react"; import { observer } from "mobx-react";
// plane imports // plane imports
import { Header, EHeaderVariant } from "@plane/ui"; import { Header, EHeaderVariant } from "@plane/ui";

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
import { observer } from "mobx-react"; import { observer } from "mobx-react";
import { EIconSize } from "@plane/constants"; import { EIconSize } from "@plane/constants";
import { StateGroupIcon, CloseIcon } from "@plane/propel/icons"; import { StateGroupIcon, CloseIcon } from "@plane/propel/icons";

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
import { observer } from "mobx-react"; import { observer } from "mobx-react";
import { INBOX_STATUS } from "@plane/constants"; import { INBOX_STATUS } from "@plane/constants";
import { useTranslation } from "@plane/i18n"; import { useTranslation } from "@plane/i18n";

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
import { useState } from "react"; import { useState } from "react";
import { concat, uniq } from "lodash-es"; import { concat, uniq } from "lodash-es";
import { observer } from "mobx-react"; import { observer } from "mobx-react";

View file

@ -4,21 +4,18 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
import { useState } from "react"; import { useState } from "react";
import { observer } from "mobx-react"; import { observer } from "mobx-react";
import { SearchIcon, CloseIcon } from "@plane/propel/icons"; import { SearchIcon, CloseIcon } from "@plane/propel/icons";
// hooks // hooks
import { useLabel } from "@/hooks/store/use-label"; import { useLabel } from "@/hooks/store/use-label";
import { useMember } from "@/hooks/store/use-member"; import { useMember } from "@/hooks/store/use-member";
import { useProjectState } from "@/hooks/store/use-project-state";
import { usePlatformOS } from "@/hooks/use-platform-os"; import { usePlatformOS } from "@/hooks/use-platform-os";
// local imports // local imports
import { FilterDate } from "./date"; import { FilterDate } from "./date";
import { FilterLabels } from "./labels"; import { FilterLabels } from "./labels";
import { FilterMember } from "./members"; import { FilterMember } from "./members";
import { FilterPriority } from "./priority"; import { FilterPriority } from "./priority";
import { FilterState } from "./state";
import { FilterStatus } from "./status"; import { FilterStatus } from "./status";
export const InboxIssueFilterSelection = observer(function InboxIssueFilterSelection() { export const InboxIssueFilterSelection = observer(function InboxIssueFilterSelection() {
@ -28,7 +25,6 @@ export const InboxIssueFilterSelection = observer(function InboxIssueFilterSelec
project: { projectMemberIds }, project: { projectMemberIds },
} = useMember(); } = useMember();
const { projectLabels } = useLabel(); const { projectLabels } = useLabel();
const { projectStates } = useProjectState();
// states // states
const [filtersSearchQuery, setFiltersSearchQuery] = useState(""); const [filtersSearchQuery, setFiltersSearchQuery] = useState("");

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
import { useState } from "react"; import { useState } from "react";
import { observer } from "mobx-react"; import { observer } from "mobx-react";
import type { IIssueLabel } from "@plane/types"; import type { IIssueLabel } from "@plane/types";

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
import { useMemo, useState } from "react"; import { useMemo, useState } from "react";
import { sortBy } from "lodash-es"; import { sortBy } from "lodash-es";
import { observer } from "mobx-react"; import { observer } from "mobx-react";

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
import { useState } from "react"; import { useState } from "react";
import { observer } from "mobx-react"; import { observer } from "mobx-react";
import { ISSUE_PRIORITIES } from "@plane/constants"; import { ISSUE_PRIORITIES } from "@plane/constants";

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
import { useState } from "react"; import { useState } from "react";
import { observer } from "mobx-react"; import { observer } from "mobx-react";
import { EIconSize } from "@plane/constants"; import { EIconSize } from "@plane/constants";

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
import { useState } from "react"; import { useState } from "react";
import { observer } from "mobx-react"; import { observer } from "mobx-react";
// types // types

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
import { ListFilter } from "lucide-react"; import { ListFilter } from "lucide-react";
import { getButtonStyling } from "@plane/propel/button"; import { getButtonStyling } from "@plane/propel/button";
// plane imports // plane imports

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
import { observer } from "mobx-react"; import { observer } from "mobx-react";
import { ArrowDownWideNarrow, ArrowUpWideNarrow } from "lucide-react"; import { ArrowDownWideNarrow, ArrowUpWideNarrow } from "lucide-react";
import { INBOX_ISSUE_ORDER_BY_OPTIONS, INBOX_ISSUE_SORT_BY_OPTIONS } from "@plane/constants"; import { INBOX_ISSUE_ORDER_BY_OPTIONS, INBOX_ISSUE_SORT_BY_OPTIONS } from "@plane/constants";

View file

@ -4,7 +4,7 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC, RefObject } from "react"; import type { RefObject } from "react";
import { observer } from "mobx-react"; import { observer } from "mobx-react";
// plane imports // plane imports
import { ETabIndices } from "@plane/constants"; import { ETabIndices } from "@plane/constants";

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
import { useState } from "react"; import { useState } from "react";
import { observer } from "mobx-react"; import { observer } from "mobx-react";
import { ETabIndices } from "@plane/constants"; import { ETabIndices } from "@plane/constants";

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
import { observer } from "mobx-react"; import { observer } from "mobx-react";
// plane imports // plane imports
import { ETabIndices } from "@plane/constants"; import { ETabIndices } from "@plane/constants";

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
import { useState } from "react"; import { useState } from "react";
// plane imports // plane imports
import { EModalPosition, EModalWidth, ModalCore } from "@plane/ui"; import { EModalPosition, EModalWidth, ModalCore } from "@plane/ui";

View file

@ -4,7 +4,7 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC, MouseEvent } from "react"; import type { MouseEvent } from "react";
import { observer } from "mobx-react"; import { observer } from "mobx-react";
import Link from "next/link"; import Link from "next/link";
import { useSearchParams } from "next/navigation"; import { useSearchParams } from "next/navigation";

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
import { Fragment } from "react"; import { Fragment } from "react";
import { observer } from "mobx-react"; import { observer } from "mobx-react";
// local imports // local imports

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
import { useTheme } from "next-themes"; import { useTheme } from "next-themes";
// assets // assets
import maintenanceModeDarkModeImage from "@/app/assets/instance/maintenance-mode-dark.svg?url"; import maintenanceModeDarkModeImage from "@/app/assets/instance/maintenance-mode-dark.svg?url";

View file

@ -11,7 +11,7 @@ import type { SubmitHandler } from "react-hook-form";
import { Controller, useForm } from "react-hook-form"; import { Controller, useForm } from "react-hook-form";
import { Popover, Transition } from "@headlessui/react"; import { Popover, Transition } from "@headlessui/react";
// plane imports // plane imports
import { getRandomLabelColor, LABEL_COLOR_OPTIONS, PROJECT_SETTINGS_TRACKER_EVENTS } from "@plane/constants"; import { getRandomLabelColor, LABEL_COLOR_OPTIONS } from "@plane/constants";
import { useTranslation } from "@plane/i18n"; import { useTranslation } from "@plane/i18n";
import { Button } from "@plane/propel/button"; import { Button } from "@plane/propel/button";
import { TOAST_TYPE, setToast } from "@plane/propel/toast"; import { TOAST_TYPE, setToast } from "@plane/propel/toast";
@ -91,7 +91,7 @@ export const CreateUpdateLabelInline = observer(
await labelOperationsCallbacks await labelOperationsCallbacks
.createLabel(formData) .createLabel(formData)
.then((res) => { .then((_res) => {
handleClose(); handleClose();
reset(defaultValues); reset(defaultValues);
}) })
@ -111,7 +111,7 @@ export const CreateUpdateLabelInline = observer(
await labelOperationsCallbacks await labelOperationsCallbacks
.updateLabel(labelToUpdate.id, formData) .updateLabel(labelToUpdate.id, formData)
.then((res) => { .then((_res) => {
reset(defaultValues); reset(defaultValues);
handleClose(); handleClose();
}) })

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
import { Fragment, useMemo, useState } from "react"; import { Fragment, useMemo, useState } from "react";
import { observer } from "mobx-react"; import { observer } from "mobx-react";
import { useSearchParams } from "next/navigation"; import { useSearchParams } from "next/navigation";
@ -112,7 +111,7 @@ export const ModuleAnalyticsProgress = observer(function ModuleAnalyticsProgress
await fetchModuleDetails(workspaceSlug, projectId, moduleId); await fetchModuleDetails(workspaceSlug, projectId, moduleId);
} }
setLoader(false); setLoader(false);
} catch (error) { } catch (_error) {
setLoader(false); setLoader(false);
setPlotType(moduleId, plotType); setPlotType(moduleId, plotType);
} }

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
import { useCallback, useRef, useState } from "react"; import { useCallback, useRef, useState } from "react";
import { observer } from "mobx-react"; import { observer } from "mobx-react";
import { useParams } from "next/navigation"; import { useParams } from "next/navigation";

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
import { observer } from "mobx-react"; import { observer } from "mobx-react";
// assets // assets
import AllFiltersImage from "@/app/assets/empty-state/module/all-filters.svg?url"; import AllFiltersImage from "@/app/assets/empty-state/module/all-filters.svg?url";

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
import { useEffect } from "react"; import { useEffect } from "react";
import { Controller, useForm } from "react-hook-form"; import { Controller, useForm } from "react-hook-form";
// plane types // plane types

View file

@ -58,7 +58,7 @@ export const CreateUpdateModuleModal = observer(function CreateUpdateModuleModal
const selectedProjectId = payload.project_id ?? projectId.toString(); const selectedProjectId = payload.project_id ?? projectId.toString();
await createModule(workspaceSlug.toString(), selectedProjectId, payload) await createModule(workspaceSlug.toString(), selectedProjectId, payload)
.then((res) => { .then((_res) => {
handleClose(); handleClose();
setToast({ setToast({
type: TOAST_TYPE.SUCCESS, type: TOAST_TYPE.SUCCESS,
@ -80,7 +80,7 @@ export const CreateUpdateModuleModal = observer(function CreateUpdateModuleModal
const selectedProjectId = payload.project_id ?? projectId.toString(); const selectedProjectId = payload.project_id ?? projectId.toString();
await updateModuleDetails(workspaceSlug.toString(), selectedProjectId, data.id, payload) await updateModuleDetails(workspaceSlug.toString(), selectedProjectId, data.id, payload)
.then((res) => { .then((_res) => {
handleClose(); handleClose();
setToast({ setToast({

View file

@ -9,14 +9,7 @@ import { observer } from "mobx-react";
import { useParams } from "next/navigation"; import { useParams } from "next/navigation";
import { SquareUser } from "lucide-react"; import { SquareUser } from "lucide-react";
// Plane imports // Plane imports
import { import { MODULE_STATUS, EUserPermissions, EUserPermissionsLevel, IS_FAVORITE_MENU_OPEN } from "@plane/constants";
MODULE_STATUS,
EUserPermissions,
EUserPermissionsLevel,
IS_FAVORITE_MENU_OPEN,
MODULE_TRACKER_EVENTS,
MODULE_TRACKER_ELEMENTS,
} from "@plane/constants";
import { useLocalStorage } from "@plane/hooks"; import { useLocalStorage } from "@plane/hooks";
import { useTranslation } from "@plane/i18n"; import { useTranslation } from "@plane/i18n";
import { TOAST_TYPE, setPromiseToast, setToast } from "@plane/propel/toast"; import { TOAST_TYPE, setPromiseToast, setToast } from "@plane/propel/toast";

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
import React from "react"; import React from "react";
import { observer } from "mobx-react"; import { observer } from "mobx-react";
import { MODULE_STATUS } from "@plane/constants"; import { MODULE_STATUS } from "@plane/constants";

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
import React, { useCallback, useEffect, useRef, useState } from "react"; import React, { useCallback, useEffect, useRef, useState } from "react";
import { observer } from "mobx-react"; import { observer } from "mobx-react";
import { useParams } from "next/navigation"; import { useParams } from "next/navigation";

View file

@ -9,7 +9,6 @@ import { observer } from "mobx-react";
import { MoreHorizontal } from "lucide-react"; import { MoreHorizontal } from "lucide-react";
// plane imports // plane imports
import { EUserPermissions, EUserPermissionsLevel } from "@plane/constants"; import { EUserPermissions, EUserPermissionsLevel } from "@plane/constants";
import { useTranslation } from "@plane/i18n";
import { IconButton } from "@plane/propel/icon-button"; import { IconButton } from "@plane/propel/icon-button";
import { TOAST_TYPE, setToast } from "@plane/propel/toast"; import { TOAST_TYPE, setToast } from "@plane/propel/toast";
import type { TContextMenuItem } from "@plane/ui"; import type { TContextMenuItem } from "@plane/ui";
@ -44,7 +43,6 @@ export const ModuleQuickActions = observer(function ModuleQuickActions(props: Pr
const { getModuleById, restoreModule } = useModule(); const { getModuleById, restoreModule } = useModule();
const { t } = useTranslation();
// derived values // derived values
const moduleDetails = getModuleById(moduleId); const moduleDetails = getModuleById(moduleId);
// auth // auth

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
import { useCallback, useMemo, useState } from "react"; import { useCallback, useMemo, useState } from "react";
import { observer } from "mobx-react"; import { observer } from "mobx-react";
import { useParams } from "next/navigation"; import { useParams } from "next/navigation";

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
import React, { useEffect } from "react"; import React, { useEffect } from "react";
import { observer } from "mobx-react"; import { observer } from "mobx-react";
import { useParams, useLocation, Link, useNavigate } from "react-router"; import { useParams, useLocation, Link, useNavigate } from "react-router";

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
import { observer } from "mobx-react"; import { observer } from "mobx-react";
// plane imports // plane imports
import { PlaneLockup, ChevronLeftIcon } from "@plane/propel/icons"; import { PlaneLockup, ChevronLeftIcon } from "@plane/propel/icons";

View file

@ -262,7 +262,7 @@ const InviteMemberInput = observer(function InviteMemberInput(props: InviteMembe
}); });
export function InviteMembers(props: Props) { export function InviteMembers(props: Props) {
const { finishOnboarding, totalSteps, workspace } = props; const { finishOnboarding, workspace } = props;
const [isInvitationDisabled, setIsInvitationDisabled] = useState(true); const [isInvitationDisabled, setIsInvitationDisabled] = useState(true);

View file

@ -4,8 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
type Props = { type Props = {
title: string; title: string;
description: string; description: string;

View file

@ -4,8 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
import { CheckIcon } from "@plane/propel/icons"; import { CheckIcon } from "@plane/propel/icons";
type Props = { type Props = {

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type { FC } from "react";
import { useState } from "react"; import { useState } from "react";
import { observer } from "mobx-react"; import { observer } from "mobx-react";
import { Menu, Transition } from "@headlessui/react"; import { Menu, Transition } from "@headlessui/react";

View file

@ -45,7 +45,6 @@ import type { TPageInstance } from "@/store/pages/base-page";
import { PageContentLoader } from "../loaders/page-content-loader"; import { PageContentLoader } from "../loaders/page-content-loader";
import { PageEditorHeaderRoot } from "./header"; import { PageEditorHeaderRoot } from "./header";
import { PageContentBrowser } from "./summary"; import { PageContentBrowser } from "./summary";
import { PageEditorTitle } from "./title";
export type TEditorBodyConfig = { export type TEditorBodyConfig = {
fileHandler: TFileHandler; fileHandler: TFileHandler;

View file

@ -10,7 +10,6 @@ import { ArrowUpToLine, Clipboard, History } from "lucide-react";
// plane imports // plane imports
import { TOAST_TYPE, setToast } from "@plane/propel/toast"; import { TOAST_TYPE, setToast } from "@plane/propel/toast";
import { ToggleSwitch } from "@plane/ui"; import { ToggleSwitch } from "@plane/ui";
import { copyTextToClipboard } from "@plane/utils";
// hooks // hooks
import { useAppRouter } from "@/hooks/use-app-router"; import { useAppRouter } from "@/hooks/use-app-router";
import { usePageFilters } from "@/hooks/use-page-filters"; import { usePageFilters } from "@/hooks/use-page-filters";

View file

@ -4,11 +4,11 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import { ArrowDownWideNarrow, ArrowUpWideNarrow, Check } from "lucide-react"; import { ArrowDownWideNarrow, ArrowUpWideNarrow } from "lucide-react";
// plane imports // plane imports
import { getButtonStyling } from "@plane/propel/button"; import { getButtonStyling } from "@plane/propel/button";
// types // types
import { CheckIcon, ChevronDownIcon } from "@plane/propel/icons"; import { CheckIcon } from "@plane/propel/icons";
import type { TPageFiltersSortBy, TPageFiltersSortKey } from "@plane/types"; import type { TPageFiltersSortBy, TPageFiltersSortKey } from "@plane/types";
import { CustomMenu } from "@plane/ui"; import { CustomMenu } from "@plane/ui";

View file

@ -4,7 +4,6 @@
* See the LICENSE file for details. * See the LICENSE file for details.
*/ */
import type React from "react";
import { observer } from "mobx-react"; import { observer } from "mobx-react";
// plane imports // plane imports
import { useTranslation } from "@plane/i18n"; import { useTranslation } from "@plane/i18n";

View file

@ -12,7 +12,6 @@ import type { IWorkspaceSearchResults } from "@plane/types";
// hooks // hooks
import { useAppRouter } from "@/hooks/use-app-router"; import { useAppRouter } from "@/hooks/use-app-router";
// helpers // helpers
import { openProjectAndScrollToSidebar } from "../../actions/helper";
import { PowerKModalCommandItem } from "./command-item"; import { PowerKModalCommandItem } from "./command-item";
import { POWER_K_SEARCH_RESULTS_GROUPS_MAP } from "./search-results-map"; import { POWER_K_SEARCH_RESULTS_GROUPS_MAP } from "./search-results-map";

View file

@ -34,7 +34,7 @@ export const StateCreate = observer(function StateCreate(props: TStateCreate) {
if (!groupKey) return { status: "error" }; if (!groupKey) return { status: "error" };
try { try {
const response = await createStateCallback({ ...formData, group: groupKey }); await createStateCallback({ ...formData, group: groupKey });
setToast({ setToast({
type: TOAST_TYPE.SUCCESS, type: TOAST_TYPE.SUCCESS,

Some files were not shown because too many files have changed in this diff Show more