Skip to content

Commit

Permalink
chore: code refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
anmolsinghbhatia committed Oct 11, 2024
1 parent 5e43e9c commit 671ddbe
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 2 additions & 0 deletions packages/types/src/workspace-draft-issues/base.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ export type TWorkspaceDraftIssue = {
updated_by: string;

is_draft: boolean;

type_id: string;
};

export type TWorkspaceDraftPaginationInfo<T> = {
Expand Down
8 changes: 8 additions & 0 deletions web/ce/components/issues/issue-details/issue-identifier.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { FC } from "react";
import { observer } from "mobx-react";
// types
import { IIssueDisplayProperties } from "@plane/types";
Expand Down Expand Up @@ -28,6 +29,13 @@ type TIssueIdentifierWithDetails = TIssueIdentifierBaseProps & {

export type TIssueIdentifierProps = TIssueIdentifierFromStore | TIssueIdentifierWithDetails;

type TIssueTypeIdentifier = {
issueTypeId: string;
size?: "xs" | "sm" | "md" | "lg";
};

export const IssueTypeIdentifier: FC<TIssueTypeIdentifier> = observer((props) => <></>);

Check warning on line 37 in web/ce/components/issues/issue-details/issue-identifier.tsx

View workflow job for this annotation

GitHub Actions / lint-web

'props' is defined but never used

type TIdentifierTextProps = {
identifier: string;
enableClickToCopyIdentifier?: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { cn } from "@/helpers/common.helper";
// hooks
import { useAppTheme, useProject, useWorkspaceDraftIssues } from "@/hooks/store";
// plane-web components
import { IdentifierText } from "ce/components/issues";
import { IdentifierText, IssueTypeIdentifier } from "@/plane-web/components/issues";
// local components
import { WorkspaceDraftIssueQuickActions } from "../issue-layouts";
import { DraftIssueProperties } from "./draft-issue-properties";
Expand Down Expand Up @@ -51,6 +51,7 @@ export const DraftIssueBlock: FC<Props> = observer((props) => {
<div className="flex-shrink-0">
{issue.project_id && (
<div className="flex items-center space-x-2">
{issue?.type_id && <IssueTypeIdentifier issueTypeId={issue.type_id} />}
<IdentifierText
identifier={projectIdentifier}
enableClickToCopyIdentifier
Expand Down

0 comments on commit 671ddbe

Please sign in to comment.