fix: breadcrumb project icon improvement (#2764)

This commit is contained in:
Anmol Singh Bhatia 2023-11-14 18:27:47 +05:30 committed by GitHub
parent a8904bfc48
commit f0c72bf249
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,7 +2,7 @@ import { useCallback, useState } from "react";
import Link from "next/link"; import Link from "next/link";
import { useRouter } from "next/router"; import { useRouter } from "next/router";
import { observer } from "mobx-react-lite"; import { observer } from "mobx-react-lite";
import { ArrowLeft, Circle, ExternalLink, Plus } from "lucide-react"; import { ArrowLeft, Briefcase, Circle, ExternalLink, Plus } from "lucide-react";
// mobx store // mobx store
import { useMobxStore } from "lib/mobx/store-provider"; import { useMobxStore } from "lib/mobx/store-provider";
// components // components
@ -121,6 +121,7 @@ export const ProjectIssuesHeader: React.FC = observer(() => {
<Breadcrumbs.BreadcrumbItem <Breadcrumbs.BreadcrumbItem
type="text" type="text"
icon={ icon={
currentProjectDetails ? (
currentProjectDetails?.emoji ? ( currentProjectDetails?.emoji ? (
<span className="grid h-7 w-7 flex-shrink-0 place-items-center rounded uppercase"> <span className="grid h-7 w-7 flex-shrink-0 place-items-center rounded uppercase">
{renderEmoji(currentProjectDetails.emoji)} {renderEmoji(currentProjectDetails.emoji)}
@ -134,6 +135,11 @@ export const ProjectIssuesHeader: React.FC = observer(() => {
{currentProjectDetails?.name.charAt(0)} {currentProjectDetails?.name.charAt(0)}
</span> </span>
) )
) : (
<span className="grid h-7 w-7 flex-shrink-0 place-items-center rounded uppercase">
<Briefcase className="h-4 w-4" />
</span>
)
} }
label={currentProjectDetails?.name ?? "Project"} label={currentProjectDetails?.name ?? "Project"}
link={`/${workspaceSlug}/projects`} link={`/${workspaceSlug}/projects`}