-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ojoi): Bug fixes and add adverts to web project. (#16388)
* Fixed bugs found in testing phase. * Changed to fetch five latest adverts and updated UI to wrap the categories --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
- Loading branch information
1 parent
4ab0c90
commit 5ce0312
Showing
12 changed files
with
159 additions
and
37 deletions.
There are no files selected for viewing
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
30 changes: 30 additions & 0 deletions
30
apps/web/components/OfficialJournalOfIceland/OJOIAdvertCards.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,30 @@ | ||
import { OfficialJournalOfIcelandAdvertsResponse } from '@island.is/api/schema' | ||
import { Stack } from '@island.is/island-ui/core' | ||
import { Locale } from '@island.is/shared/types' | ||
import { linkResolver } from '@island.is/web/hooks' | ||
|
||
import { OJOIAdvertCard } from './OJOIAdvertCard' | ||
|
||
type Props = { | ||
adverts?: OfficialJournalOfIcelandAdvertsResponse['adverts'] | ||
locale: Locale | ||
} | ||
|
||
export const OJOIAdvertCards = ({ adverts, locale }: Props) => { | ||
return ( | ||
<Stack space={3}> | ||
{adverts?.map((ad) => ( | ||
<OJOIAdvertCard | ||
key={ad.id} | ||
institution={ad.involvedParty?.title} | ||
department={ad.department?.title} | ||
publicationNumber={ad.publicationNumber?.full} | ||
publicationDate={ad.publicationDate} | ||
title={ad.title} | ||
categories={ad.categories?.map((cat) => cat.title)} | ||
link={linkResolver('ojoiadvert', [ad.id], locale).href} | ||
/> | ||
))} | ||
</Stack> | ||
) | ||
} |
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
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
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
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
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