-
Notifications
You must be signed in to change notification settings - Fork 1
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
09e72a4
commit 5bbef18
Showing
3 changed files
with
52 additions
and
1 deletion.
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
apps/jobboard/src/app/(public)/job-offers/[publicId]/page.tsx
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,39 @@ | ||
import { Metadata } from 'next'; | ||
|
||
import { Header } from '@jobboard/common-ui'; | ||
|
||
import Link from 'next/link'; | ||
import { fetchOffer } from '../../../../services/offers'; | ||
import { notFound } from 'next/navigation'; | ||
|
||
// export const metadata: Metadata = { | ||
// title: 'Job Offers', | ||
// }; | ||
|
||
type Params = { | ||
params: { | ||
publicId: string; | ||
}; | ||
}; | ||
|
||
export default async function JobOfferPage({ params }: Params) { | ||
console.log(params.publicId); | ||
const offer = await fetchOffer(params.publicId); | ||
console.log(offer); | ||
|
||
if (!offer) { | ||
notFound(); | ||
} | ||
|
||
return ( | ||
<div> | ||
<Header>Job Offer</Header> | ||
<Link href="/job-offers">Back to list</Link> | ||
<div key={offer.public_id} className="my-4"> | ||
<h2 className="font-bold text-2xl">{offer.title}</h2> | ||
<p>{offer.description}</p> | ||
<p>Salary: {offer.salary} PLN</p> | ||
</div> | ||
</div> | ||
); | ||
} |
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
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