-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f5a7230
commit 0448708
Showing
3 changed files
with
55 additions
and
4 deletions.
There are no files selected for viewing
File renamed without changes.
54 changes: 54 additions & 0 deletions
54
src/pages/recruitment-solutions/case-studies/[url_slug]/index.page.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import { Content } from "@/ui"; | ||
import { getRoute } from "@/getters/getRoute"; | ||
import { casestudyHelper } from "@/helpers/casestudyHelper"; | ||
|
||
export default function CaseStudyPage({ content }) { | ||
return ( | ||
<> | ||
<Content items={content} /> | ||
</> | ||
); | ||
} | ||
|
||
export async function getStaticProps({ params: { url_slug } }) { | ||
const casestudy = casestudyHelper.find(url_slug); | ||
|
||
return { | ||
props: { | ||
meta: {}, | ||
content: [ | ||
{ | ||
component: "BreadcrumbNavigation", | ||
props: { | ||
items: [ | ||
{ label: "Recruitment Solutions", href: getRoute("recruitmentSolutions") }, | ||
{ label: "Case Studies", href: getRoute("caseStudies") }, | ||
{ label: casestudy.title, href: getRoute("caseStudy", { url_slug }) }, | ||
], | ||
}, | ||
}, | ||
{ | ||
component: "Header", | ||
props: { | ||
title: { | ||
path: `page.caseStudy.${url_slug}.component.Header.title`, | ||
placeholder: casestudy.title, | ||
}, | ||
back: { | ||
path: "page.caseStudy.component.Header.back", | ||
placeholder: `Back to Case Studies`, | ||
href: getRoute("caseStudies"), | ||
}, | ||
}, | ||
}, | ||
], | ||
}, | ||
}; | ||
} | ||
|
||
export async function getStaticPaths() { | ||
return { | ||
paths: casestudyHelper.toPaths(), | ||
fallback: false, | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters