Chore/BOOK-708 replace title component * chore(BOOK-708): replace title with typography * chore(BOOK-708): replace title with typography * chore(BOOK-708): remove Title from package.json Approved-by: Linus Flood Approved-by: Anton Gunnarsson
39 lines
802 B
TypeScript
39 lines
802 B
TypeScript
import { getJobylonFeed } from "@/lib/trpc/memoizedRequests"
|
|
|
|
import { Section } from "@/components/Section"
|
|
import { SectionHeader } from "@/components/Section/Header"
|
|
import SectionLink from "@/components/Section/Link"
|
|
|
|
import JobList from "./JobList"
|
|
|
|
interface JobylonFeedProps {
|
|
title?: string
|
|
subtitle?: string
|
|
link?: { href: string; text: string }
|
|
}
|
|
|
|
export default async function JobylonFeed({
|
|
title,
|
|
subtitle,
|
|
link,
|
|
}: JobylonFeedProps) {
|
|
const allJobs = await getJobylonFeed()
|
|
|
|
if (!allJobs) {
|
|
return null
|
|
}
|
|
|
|
return (
|
|
<Section>
|
|
<SectionHeader
|
|
link={link}
|
|
preamble={subtitle}
|
|
heading={title}
|
|
headingLevel="h2"
|
|
/>
|
|
<JobList allJobs={allJobs} />
|
|
<SectionLink link={link} variant="mobile" />
|
|
</Section>
|
|
)
|
|
}
|