fix: eslint issues and reconfiguring (#3891)
* fix: eslint fixes --------- Co-authored-by: gurusainath <gurusainath007@gmail.com>
This commit is contained in:
parent
921b9078f1
commit
3d09a69d58
790 changed files with 4155 additions and 4051 deletions
|
|
@ -1,14 +1,14 @@
|
|||
import { observer } from "mobx-react-lite";
|
||||
import { useTheme } from "next-themes";
|
||||
// hooks
|
||||
import { useApplication, useEventTracker, useProject, useUser } from "hooks/store";
|
||||
// components
|
||||
import { ProjectCard } from "components/project";
|
||||
import { EmptyState, getEmptyStateImagePath } from "components/empty-state";
|
||||
import { ProjectCard } from "components/project";
|
||||
import { ProjectsLoader } from "components/ui";
|
||||
// constants
|
||||
import { EUserWorkspaceRoles } from "constants/workspace";
|
||||
import { WORKSPACE_EMPTY_STATE_DETAILS } from "constants/empty-state";
|
||||
import { EUserWorkspaceRoles } from "constants/workspace";
|
||||
import { useApplication, useEventTracker, useProject, useUser } from "hooks/store";
|
||||
|
||||
export const ProjectCardList = observer(() => {
|
||||
// theme
|
||||
|
|
|
|||
|
|
@ -1,21 +1,20 @@
|
|||
import React, { useState } from "react";
|
||||
import { useRouter } from "next/router";
|
||||
import { observer } from "mobx-react-lite";
|
||||
import { LinkIcon, Lock, Pencil, Star } from "lucide-react";
|
||||
import Link from "next/link";
|
||||
// hooks
|
||||
import { useProject } from "hooks/store";
|
||||
// components
|
||||
import { DeleteProjectModal, JoinProjectModal } from "components/project";
|
||||
import { useRouter } from "next/router";
|
||||
import { LinkIcon, Lock, Pencil, Star } from "lucide-react";
|
||||
// ui
|
||||
import { Avatar, AvatarGroup, Button, Tooltip, TOAST_TYPE, setToast, setPromiseToast } from "@plane/ui";
|
||||
// components
|
||||
import { DeleteProjectModal, JoinProjectModal, EUserProjectRoles } from "components/project";
|
||||
// helpers
|
||||
import { copyTextToClipboard } from "helpers/string.helper";
|
||||
import { renderEmoji } from "helpers/emoji.helper";
|
||||
import { copyTextToClipboard } from "helpers/string.helper";
|
||||
// hooks
|
||||
import { useProject } from "hooks/store";
|
||||
// types
|
||||
import type { IProject } from "@plane/types";
|
||||
// constants
|
||||
import { EUserProjectRoles } from "constants/project";
|
||||
|
||||
export type ProjectCardProps = {
|
||||
project: IProject;
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
import React, { useState } from "react";
|
||||
import { Dialog, Transition } from "@headlessui/react";
|
||||
import { observer } from "mobx-react-lite";
|
||||
import { Dialog, Transition } from "@headlessui/react";
|
||||
import { AlertTriangle } from "lucide-react";
|
||||
// hooks
|
||||
import { Button } from "@plane/ui";
|
||||
import { useUser } from "hooks/store";
|
||||
// ui
|
||||
import { Button } from "@plane/ui";
|
||||
// types
|
||||
import { IUserLite } from "@plane/types";
|
||||
|
||||
|
|
@ -94,8 +94,8 @@ export const ConfirmProjectMemberRemove: React.FC<Props> = observer((props) => {
|
|||
? "Leaving..."
|
||||
: "Leave"
|
||||
: isDeleteLoading
|
||||
? "Removing..."
|
||||
: "Remove"}
|
||||
? "Removing..."
|
||||
: "Remove"}
|
||||
</Button>
|
||||
</div>
|
||||
</Dialog.Panel>
|
||||
|
|
|
|||
|
|
@ -1,23 +1,22 @@
|
|||
import { useState, useEffect, Fragment, FC, ChangeEvent } from "react";
|
||||
import { observer } from "mobx-react-lite";
|
||||
import { useForm, Controller } from "react-hook-form";
|
||||
import { Dialog, Transition } from "@headlessui/react";
|
||||
import { observer } from "mobx-react-lite";
|
||||
import { X } from "lucide-react";
|
||||
// hooks
|
||||
import { useEventTracker, useProject, useUser } from "hooks/store";
|
||||
// ui
|
||||
import { Button, CustomSelect, Input, TextArea, TOAST_TYPE, setToast } from "@plane/ui";
|
||||
// components
|
||||
import { ImagePickerPopover } from "components/core";
|
||||
import EmojiIconPicker from "components/emoji-icon-picker";
|
||||
import { MemberDropdown } from "components/dropdowns";
|
||||
import EmojiIconPicker from "components/emoji-icon-picker";
|
||||
// constants
|
||||
import { PROJECT_CREATED } from "constants/event-tracker";
|
||||
import { NETWORK_CHOICES, PROJECT_UNSPLASH_COVERS } from "constants/project";
|
||||
import { EUserWorkspaceRoles } from "constants/workspace";
|
||||
// helpers
|
||||
import { getRandomEmoji, renderEmoji } from "helpers/emoji.helper";
|
||||
// constants
|
||||
import { NETWORK_CHOICES, PROJECT_UNSPLASH_COVERS } from "constants/project";
|
||||
// constants
|
||||
import { EUserWorkspaceRoles } from "constants/workspace";
|
||||
import { PROJECT_CREATED } from "constants/event-tracker";
|
||||
// hooks
|
||||
import { useEventTracker, useProject, useUser } from "hooks/store";
|
||||
|
||||
type Props = {
|
||||
isOpen: boolean;
|
||||
|
|
@ -306,7 +305,7 @@ export const CreateProjectModal: FC<Props> = observer((props) => {
|
|||
onChange={handleIdentifierChange(onChange)}
|
||||
hasError={Boolean(errors.identifier)}
|
||||
placeholder="Identifier"
|
||||
className="w-full text-xs focus:border-blue-400 uppercase"
|
||||
className="w-full text-xs uppercase focus:border-blue-400"
|
||||
tabIndex={2}
|
||||
/>
|
||||
)}
|
||||
|
|
|
|||
|
|
@ -4,13 +4,12 @@ import { Controller, useForm } from "react-hook-form";
|
|||
import { Dialog, Transition } from "@headlessui/react";
|
||||
import { AlertTriangle } from "lucide-react";
|
||||
// hooks
|
||||
import { useEventTracker, useProject, useWorkspace } from "hooks/store";
|
||||
// ui
|
||||
import { Button, Input, TOAST_TYPE, setToast } from "@plane/ui";
|
||||
import { useEventTracker, useProject } from "hooks/store";
|
||||
// ui
|
||||
// types
|
||||
import type { IProject } from "@plane/types";
|
||||
// constants
|
||||
import { PROJECT_DELETED } from "constants/event-tracker";
|
||||
|
||||
type DeleteProjectModal = {
|
||||
isOpen: boolean;
|
||||
|
|
@ -27,7 +26,6 @@ export const DeleteProjectModal: React.FC<DeleteProjectModal> = (props) => {
|
|||
const { isOpen, project, onClose } = props;
|
||||
// store hooks
|
||||
const { captureProjectEvent } = useEventTracker();
|
||||
const { currentWorkspace } = useWorkspace();
|
||||
const { deleteProject } = useProject();
|
||||
// router
|
||||
const router = useRouter();
|
||||
|
|
|
|||
|
|
@ -1,23 +1,24 @@
|
|||
import { FC, useEffect, useState } from "react";
|
||||
import { Controller, useForm } from "react-hook-form";
|
||||
// hooks
|
||||
import { useEventTracker, useProject } from "hooks/store";
|
||||
// components
|
||||
import EmojiIconPicker from "components/emoji-icon-picker";
|
||||
import { ImagePickerPopover } from "components/core";
|
||||
import { Button, CustomSelect, Input, TextArea, TOAST_TYPE, setToast } from "@plane/ui";
|
||||
// icons
|
||||
import { Lock } from "lucide-react";
|
||||
// types
|
||||
import { IProject, IWorkspace } from "@plane/types";
|
||||
// helpers
|
||||
import { renderEmoji } from "helpers/emoji.helper";
|
||||
import { renderFormattedDate } from "helpers/date-time.helper";
|
||||
// ui
|
||||
import { Button, CustomSelect, Input, TextArea, TOAST_TYPE, setToast } from "@plane/ui";
|
||||
// components
|
||||
import { ImagePickerPopover } from "components/core";
|
||||
import EmojiIconPicker from "components/emoji-icon-picker";
|
||||
// constants
|
||||
import { PROJECT_UPDATED } from "constants/event-tracker";
|
||||
import { NETWORK_CHOICES } from "constants/project";
|
||||
// helpers
|
||||
import { renderFormattedDate } from "helpers/date-time.helper";
|
||||
import { renderEmoji } from "helpers/emoji.helper";
|
||||
// hooks
|
||||
import { useEventTracker, useProject } from "hooks/store";
|
||||
// services
|
||||
import { ProjectService } from "services/project";
|
||||
import { PROJECT_UPDATED } from "constants/event-tracker";
|
||||
// types
|
||||
import { IProject, IWorkspace } from "@plane/types";
|
||||
export interface IProjectDetailsForm {
|
||||
project: IProject;
|
||||
workspaceSlug: string;
|
||||
|
|
|
|||
|
|
@ -1,24 +1,17 @@
|
|||
import React from "react";
|
||||
|
||||
import Image from "next/image";
|
||||
|
||||
import useSWR, { mutate } from "swr";
|
||||
|
||||
// services
|
||||
import { ProjectService } from "services/project";
|
||||
// hooks
|
||||
import { useRouter } from "next/router";
|
||||
// ui
|
||||
import { TOAST_TYPE, setToast } from "@plane/ui";
|
||||
// components
|
||||
import { SelectRepository, SelectChannel } from "components/integration";
|
||||
// constants
|
||||
import { PROJECT_GITHUB_REPOSITORY } from "constants/fetch-keys";
|
||||
// icons
|
||||
import GithubLogo from "public/logos/github-square.png";
|
||||
import SlackLogo from "public/services/slack.png";
|
||||
// ui
|
||||
import { TOAST_TYPE, setToast } from "@plane/ui";
|
||||
// types
|
||||
import { IWorkspaceIntegration } from "@plane/types";
|
||||
// fetch-keys
|
||||
import { PROJECT_GITHUB_REPOSITORY } from "constants/fetch-keys";
|
||||
|
||||
type Props = {
|
||||
integration: IWorkspaceIntegration;
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@ import { useState, Fragment } from "react";
|
|||
import { useRouter } from "next/router";
|
||||
import { Transition, Dialog } from "@headlessui/react";
|
||||
// hooks
|
||||
import { Button } from "@plane/ui";
|
||||
import { useProject, useUser } from "hooks/store";
|
||||
// ui
|
||||
import { Button } from "@plane/ui";
|
||||
// types
|
||||
import type { IProject } from "@plane/types";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,17 +1,19 @@
|
|||
import { FC, Fragment } from "react";
|
||||
import { observer } from "mobx-react-lite";
|
||||
import { useRouter } from "next/router";
|
||||
import { Controller, useForm } from "react-hook-form";
|
||||
// headless ui
|
||||
import { Dialog, Transition } from "@headlessui/react";
|
||||
// icons
|
||||
import { AlertTriangleIcon } from "lucide-react";
|
||||
import { observer } from "mobx-react-lite";
|
||||
// hooks
|
||||
import { useEventTracker, useUser } from "hooks/store";
|
||||
// ui
|
||||
import { Button, Input, TOAST_TYPE, setToast } from "@plane/ui";
|
||||
// types
|
||||
import { IProject } from "@plane/types";
|
||||
// constants
|
||||
import { PROJECT_MEMBER_LEAVE } from "constants/event-tracker";
|
||||
// hooks
|
||||
import { useEventTracker, useUser } from "hooks/store";
|
||||
// types
|
||||
import { IProject } from "@plane/types";
|
||||
|
||||
type FormData = {
|
||||
projectName: string;
|
||||
|
|
|
|||
|
|
@ -1,19 +1,19 @@
|
|||
import { useState } from "react";
|
||||
import { useRouter } from "next/router";
|
||||
import Link from "next/link";
|
||||
import { observer } from "mobx-react-lite";
|
||||
// hooks
|
||||
import { useEventTracker, useMember, useProject, useUser } from "hooks/store";
|
||||
// components
|
||||
import { ConfirmProjectMemberRemove } from "components/project";
|
||||
// ui
|
||||
import { CustomSelect, Tooltip, TOAST_TYPE, setToast } from "@plane/ui";
|
||||
import Link from "next/link";
|
||||
import { useRouter } from "next/router";
|
||||
// icons
|
||||
import { ChevronDown, Dot, XCircle } from "lucide-react";
|
||||
// ui
|
||||
import { CustomSelect, Tooltip, TOAST_TYPE, setToast } from "@plane/ui";
|
||||
// components
|
||||
import { ConfirmProjectMemberRemove } from "components/project";
|
||||
// constants
|
||||
import { ROLE } from "constants/workspace";
|
||||
import { EUserProjectRoles } from "constants/project";
|
||||
import { PROJECT_MEMBER_LEAVE } from "constants/event-tracker";
|
||||
import { EUserProjectRoles } from "constants/project";
|
||||
import { ROLE } from "constants/workspace";
|
||||
// hooks
|
||||
import { useEventTracker, useMember, useProject, useUser } from "hooks/store";
|
||||
|
||||
type Props = {
|
||||
userId: string;
|
||||
|
|
|
|||
|
|
@ -2,12 +2,12 @@ import { useState } from "react";
|
|||
import { observer } from "mobx-react-lite";
|
||||
import { Search } from "lucide-react";
|
||||
// hooks
|
||||
import { useEventTracker, useMember } from "hooks/store";
|
||||
// components
|
||||
import { Button } from "@plane/ui";
|
||||
import { ProjectMemberListItem, SendProjectInvitationModal } from "components/project";
|
||||
// ui
|
||||
import { Button } from "@plane/ui";
|
||||
import { MembersSettingsLoader } from "components/ui";
|
||||
import { useEventTracker, useMember } from "hooks/store";
|
||||
|
||||
export const ProjectMemberList: React.FC = observer(() => {
|
||||
// states
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@ import React from "react";
|
|||
import { observer } from "mobx-react-lite";
|
||||
import { Ban } from "lucide-react";
|
||||
// hooks
|
||||
import { Avatar, CustomSearchSelect } from "@plane/ui";
|
||||
import { useMember } from "hooks/store";
|
||||
// ui
|
||||
import { Avatar, CustomSearchSelect } from "@plane/ui";
|
||||
|
||||
type Props = {
|
||||
value: any;
|
||||
|
|
|
|||
|
|
@ -1,20 +1,19 @@
|
|||
import { useEffect } from "react";
|
||||
import { useRouter } from "next/router";
|
||||
import useSWR from "swr";
|
||||
import { observer } from "mobx-react-lite";
|
||||
// hooks
|
||||
import { useProject, useUser } from "hooks/store";
|
||||
import { useRouter } from "next/router";
|
||||
import { Controller, useForm } from "react-hook-form";
|
||||
|
||||
import { MemberSelect } from "components/project";
|
||||
import useSWR from "swr";
|
||||
// ui
|
||||
import { Loader, TOAST_TYPE, setToast } from "@plane/ui";
|
||||
// components
|
||||
import { MemberSelect } from "components/project";
|
||||
// constants
|
||||
import { PROJECT_MEMBERS } from "constants/fetch-keys";
|
||||
import { EUserProjectRoles } from "constants/project";
|
||||
// hooks
|
||||
import { useProject, useUser } from "hooks/store";
|
||||
// types
|
||||
import { IProject, IUserLite, IWorkspace } from "@plane/types";
|
||||
// fetch-keys
|
||||
import { PROJECT_MEMBERS } from "constants/fetch-keys";
|
||||
// constants
|
||||
import { EUserProjectRoles } from "constants/project";
|
||||
|
||||
const defaultValues: Partial<IProject> = {
|
||||
project_lead: null,
|
||||
|
|
|
|||
|
|
@ -1,17 +1,21 @@
|
|||
import { Fragment, useEffect, useState } from "react";
|
||||
import { useRouter } from "next/router";
|
||||
import { observer } from "mobx-react-lite";
|
||||
import { useRouter } from "next/router";
|
||||
import { Controller, useForm } from "react-hook-form";
|
||||
// ui
|
||||
import { Dialog, Transition } from "@headlessui/react";
|
||||
// icons
|
||||
import { Check, CircleDot, Globe2 } from "lucide-react";
|
||||
// hooks
|
||||
import { useProjectPublish } from "hooks/store";
|
||||
// ui
|
||||
import { Button, Loader, ToggleSwitch, TOAST_TYPE, setToast } from "@plane/ui";
|
||||
import { CustomPopover } from "./popover";
|
||||
// hooks
|
||||
import { useProjectPublish } from "hooks/store";
|
||||
// store
|
||||
import { IProjectPublishSettings, TProjectPublishViews } from "store/project/project-publish.store";
|
||||
// types
|
||||
import { IProject } from "@plane/types";
|
||||
import { IProjectPublishSettings, TProjectPublishViews } from "store/project/project-publish.store";
|
||||
// local components
|
||||
import { CustomPopover } from "./popover";
|
||||
|
||||
type Props = {
|
||||
isOpen: boolean;
|
||||
|
|
@ -359,16 +363,16 @@ export const PublishProjectModal: React.FC<Props> = observer((props) => {
|
|||
: "hover:bg-custom-background-80 hover:text-custom-text-100"
|
||||
}`}
|
||||
onClick={() => {
|
||||
const _views =
|
||||
const optionViews =
|
||||
value.length > 0
|
||||
? value.includes(option.key)
|
||||
? value.filter((_o: string) => _o !== option.key)
|
||||
: [...value, option.key]
|
||||
: [option.key];
|
||||
|
||||
if (_views.length === 0) return;
|
||||
if (optionViews.length === 0) return;
|
||||
|
||||
onChange(_views);
|
||||
onChange(optionViews);
|
||||
checkIfUpdateIsRequired();
|
||||
}}
|
||||
>
|
||||
|
|
|
|||
|
|
@ -1,19 +1,15 @@
|
|||
import React, { useEffect } from "react";
|
||||
import { useRouter } from "next/router";
|
||||
import { observer } from "mobx-react-lite";
|
||||
import { useRouter } from "next/router";
|
||||
import { useForm, Controller, useFieldArray } from "react-hook-form";
|
||||
import { Dialog, Transition } from "@headlessui/react";
|
||||
import { ChevronDown, Plus, X } from "lucide-react";
|
||||
// hooks
|
||||
import { useEventTracker, useMember, useUser, useWorkspace } from "hooks/store";
|
||||
// ui
|
||||
import { Avatar, Button, CustomSelect, CustomSearchSelect, TOAST_TYPE, setToast } from "@plane/ui";
|
||||
// helpers
|
||||
import { getUserRole } from "helpers/user.helper";
|
||||
import { useEventTracker, useMember, useUser } from "hooks/store";
|
||||
// constants
|
||||
import { ROLE } from "constants/workspace";
|
||||
import { EUserProjectRoles } from "constants/project";
|
||||
import { PROJECT_MEMBER_ADDED } from "constants/event-tracker";
|
||||
|
||||
type Props = {
|
||||
isOpen: boolean;
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@ import React from "react";
|
|||
|
||||
// ui
|
||||
import { Disclosure, Transition } from "@headlessui/react";
|
||||
import { ChevronDown, ChevronUp } from "lucide-react";
|
||||
import { Button, Loader } from "@plane/ui";
|
||||
// icons
|
||||
import { ChevronDown, ChevronUp } from "lucide-react";
|
||||
// types
|
||||
import { IProject } from "@plane/types";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,17 +1,15 @@
|
|||
import { FC } from "react";
|
||||
import { useRouter } from "next/router";
|
||||
import { observer } from "mobx-react-lite";
|
||||
import { useRouter } from "next/router";
|
||||
import { ContrastIcon, FileText, Inbox, Layers } from "lucide-react";
|
||||
// hooks
|
||||
import { useEventTracker, useProject, useUser, useWorkspace } from "hooks/store";
|
||||
// ui
|
||||
import { DiceIcon, ToggleSwitch, TOAST_TYPE, setToast } from "@plane/ui";
|
||||
// types
|
||||
import { IProject } from "@plane/types";
|
||||
import { DiceIcon, ToggleSwitch, TOAST_TYPE, setToast } from "@plane/ui";
|
||||
// constants
|
||||
import { EUserProjectRoles } from "constants/project";
|
||||
|
||||
type Props = {};
|
||||
// hooks
|
||||
import { useEventTracker, useProject, useUser } from "hooks/store";
|
||||
// types
|
||||
import { IProject } from "@plane/types";
|
||||
|
||||
const PROJECT_FEATURES_LIST = [
|
||||
{
|
||||
|
|
@ -46,7 +44,7 @@ const PROJECT_FEATURES_LIST = [
|
|||
},
|
||||
];
|
||||
|
||||
export const ProjectFeaturesList: FC<Props> = observer(() => {
|
||||
export const ProjectFeaturesList: FC = observer(() => {
|
||||
// router
|
||||
const router = useRouter();
|
||||
const { workspaceSlug, projectId } = router.query;
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
import { useRef, useState } from "react";
|
||||
import { DraggableProvided, DraggableStateSnapshot } from "@hello-pangea/dnd";
|
||||
import { observer } from "mobx-react-lite";
|
||||
import Link from "next/link";
|
||||
import { useRouter } from "next/router";
|
||||
import { DraggableProvided, DraggableStateSnapshot } from "@hello-pangea/dnd";
|
||||
import { Disclosure, Transition } from "@headlessui/react";
|
||||
import { observer } from "mobx-react-lite";
|
||||
// icons
|
||||
import {
|
||||
MoreVertical,
|
||||
|
|
@ -18,13 +18,6 @@ import {
|
|||
MoreHorizontal,
|
||||
Inbox,
|
||||
} from "lucide-react";
|
||||
// hooks
|
||||
import { useApplication, useEventTracker, useInbox, useProject } from "hooks/store";
|
||||
import useOutsideClickDetector from "hooks/use-outside-click-detector";
|
||||
// helpers
|
||||
import { cn } from "helpers/common.helper";
|
||||
import { getNumberCount } from "helpers/string.helper";
|
||||
import { renderEmoji } from "helpers/emoji.helper";
|
||||
// ui
|
||||
import {
|
||||
CustomMenu,
|
||||
|
|
@ -36,9 +29,17 @@ import {
|
|||
LayersIcon,
|
||||
setPromiseToast,
|
||||
} from "@plane/ui";
|
||||
// components
|
||||
import { LeaveProjectModal, PublishProjectModal } from "components/project";
|
||||
import { EUserProjectRoles } from "constants/project";
|
||||
import { cn } from "helpers/common.helper";
|
||||
import { renderEmoji } from "helpers/emoji.helper";
|
||||
import { getNumberCount } from "helpers/string.helper";
|
||||
// hooks
|
||||
import { useApplication, useEventTracker, useInbox, useProject } from "hooks/store";
|
||||
import useOutsideClickDetector from "hooks/use-outside-click-detector";
|
||||
// helpers
|
||||
|
||||
// components
|
||||
|
||||
type Props = {
|
||||
projectId: string;
|
||||
|
|
|
|||
|
|
@ -1,21 +1,21 @@
|
|||
import { useState, FC, useRef, useEffect, useCallback } from "react";
|
||||
import { useRouter } from "next/router";
|
||||
import { useState, FC, useRef, useEffect } from "react";
|
||||
import { DragDropContext, Draggable, DropResult, Droppable } from "@hello-pangea/dnd";
|
||||
import { Disclosure, Transition } from "@headlessui/react";
|
||||
import { observer } from "mobx-react-lite";
|
||||
import { useRouter } from "next/router";
|
||||
import { Disclosure, Transition } from "@headlessui/react";
|
||||
import { ChevronDown, ChevronRight, Plus } from "lucide-react";
|
||||
// hooks
|
||||
import { TOAST_TYPE, setToast } from "@plane/ui";
|
||||
import { CreateProjectModal, ProjectSidebarListItem } from "components/project";
|
||||
import { EUserWorkspaceRoles } from "constants/workspace";
|
||||
import { cn } from "helpers/common.helper";
|
||||
import { orderJoinedProjects } from "helpers/project.helper";
|
||||
import { copyUrlToClipboard } from "helpers/string.helper";
|
||||
import { useApplication, useEventTracker, useProject, useUser } from "hooks/store";
|
||||
// ui
|
||||
import { TOAST_TYPE, setToast } from "@plane/ui";
|
||||
// components
|
||||
import { CreateProjectModal, ProjectSidebarListItem } from "components/project";
|
||||
// helpers
|
||||
import { copyUrlToClipboard } from "helpers/string.helper";
|
||||
import { orderJoinedProjects } from "helpers/project.helper";
|
||||
import { cn } from "helpers/common.helper";
|
||||
// constants
|
||||
import { EUserWorkspaceRoles } from "constants/workspace";
|
||||
import { IProject } from "@plane/types";
|
||||
|
||||
export const ProjectSidebarList: FC = observer(() => {
|
||||
|
|
@ -63,8 +63,8 @@ export const ProjectSidebarList: FC = observer(() => {
|
|||
|
||||
const joinedProjectsList: IProject[] = [];
|
||||
joinedProjects.map((projectId) => {
|
||||
const _project = getProjectById(projectId);
|
||||
if (_project) joinedProjectsList.push(_project);
|
||||
const projectDetails = getProjectById(projectId);
|
||||
if (projectDetails) joinedProjectsList.push(projectDetails);
|
||||
});
|
||||
if (joinedProjectsList.length <= 0) return;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue