Skip to content

Commit 909210f

Browse files
authored
fix: Wrong breadcrumbs for research projects (#581)
1 parent 6d643a0 commit 909210f

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

app/(pages)/projects/sections/ProjectContent.tsx

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,13 @@ export const ProjectContent = ({ project }: { project: ProjectInterface }) => {
7474
const projectStatusMessage =
7575
ProjectStatusMessageMap?.[project?.projectStatus as ProjectStatus]
7676

77-
const isResearchProject = project?.category === ProjectCategory.RESEARCH
77+
const isResearchProject =
78+
project?.category?.toLowerCase() === ProjectCategory.RESEARCH.toLowerCase()
79+
const backLink = isResearchProject ? "/research" : "/projects"
80+
81+
console.table({
82+
isResearchProject,
83+
})
7884

7985
return (
8086
<section className="bg-project-page-gradient dark:bg-transparent-gradient relative">
@@ -117,10 +123,12 @@ export const ProjectContent = ({ project }: { project: ProjectInterface }) => {
117123
<div className="w-full ">
118124
<div className="flex flex-col">
119125
<div className="flex flex-col gap-6 text-left">
120-
<AppLink href="/projects">
126+
<AppLink href={backLink}>
121127
<Icons.arrowLeft />
122128
<span className="font-sans text-base">
123-
{LABELS.COMMON.PROJECT_LIBRARY}
129+
{isResearchProject
130+
? LABELS.COMMON.PROJECT_RESEARCH_LIBRARY
131+
: LABELS.COMMON.PROJECT_LIBRARY}
124132
</span>
125133
</AppLink>
126134
<div className="flex flex-col gap-2">

app/labels.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ export const LABELS = {
7474
SEARCH_PROJECT_PLACEHOLDER: "Search project title or keyword",
7575
LAST_UPDATED_AT: "Last updated {{date}}",
7676
PROJECT_LIBRARY: "Project Library",
77+
PROJECT_RESEARCH_LIBRARY: "Research Library",
7778
BACK_TO_PROJECT_LIBRARY: "Back to project library",
7879
DISCOVER_MORE: "Discover more",
7980
GO_TO_HOME: "Go to homepage",

0 commit comments

Comments
 (0)