Skip to content

Commit

Permalink
chore(deps): bump @ircsignpost/signpost-base from 16.6.0 to 16.8.0 (#21)
Browse files Browse the repository at this point in the history
Bumps [@ircsignpost/signpost-base](https://github.com/unitedforukraine/signpost-base) from 16.6.0 to 16.8.0.
- [Commits](https://github.com/unitedforukraine/signpost-base/commits)

---
updated-dependencies:
- dependency-name: "@ircsignpost/signpost-base"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
dependabot[bot] authored Dec 29, 2023
1 parent 18938b0 commit 98b5fb3
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 11 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@algolia/client-search": "^4.14.2",
"@changey/react-leaflet-markercluster": "^4.0.0-rc1",
"@directus/sdk": "^10.3.3",
"@ircsignpost/signpost-base": "16.6.0",
"@ircsignpost/signpost-base": "16.8.0",
"@next/env": "^12.2.4",
"@react-spring/web": "^9.5.4",
"@vercel/og": "^0.5.6",
Expand Down
35 changes: 32 additions & 3 deletions pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,39 @@ export const getStaticProps: GetStaticProps = async ({ locale }) => {
a.name?.normalize().localeCompare(b.name?.normalize())
);

const uniqueAccessibilityIdsSet = new Set(
services.flatMap((x) =>
x.Accessibility.map(
(accessibilityItem) => accessibilityItem.accessibility_id
)
)
);
const uniqueAccessibilityIdsArray = Array.from(uniqueAccessibilityIdsSet);

const uniquePopulationsIdsSet = new Set(
services.flatMap((x) =>
x.Populations.map((population) => population.populations_id)
)
);
const uniquePopulationsIdsArray = Array.from(uniquePopulationsIdsSet);

const uniqueProvidersIdsSet = new Set(services.flatMap((x) => x.provider.id));
const uniqueProvidersIdsArray = Array.from(uniqueProvidersIdsSet);

const serviceTypes = await getDirectusServiceCategories(directus);
const providers = await getDirectusProviders(directus, DIRECTUS_COUNTRY_ID);
const populations = await getDirectusPopulationsServed(directus);
const accessibility = await getDirectusAccessibility(directus);
const providers = await getDirectusProviders(
directus,
DIRECTUS_COUNTRY_ID,
uniqueProvidersIdsArray
);
const populations = await getDirectusPopulationsServed(
uniquePopulationsIdsArray,
directus
);
const accessibility = await getDirectusAccessibility(
uniqueAccessibilityIdsArray,
directus
);

const articles = await getArticles(currentLocale, getZendeskUrl());

Expand Down
6 changes: 3 additions & 3 deletions pages/services/[service].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -165,15 +165,15 @@ async function getStaticParams() {

const servicesFiltered = services?.filter((service) => {
const translation = service.translations.find((translation) =>
allowedLanguageCodes.includes(translation.languages_id.code)
allowedLanguageCodes.includes(translation.languages_id?.code)
);
return translation;
});

return servicesFiltered.flatMap((service) =>
service?.translations?.map((translation) => {
const locale = Object.values(LOCALES).find(
(x) => x.directus === translation.languages_id.code
(x) => x.directus === translation.languages_id?.code
);

return {
Expand Down Expand Up @@ -268,7 +268,7 @@ export const getStaticProps: GetStaticProps = async ({
const service = await getDirectusArticle(Number(params?.service), directus);

const serviceTranslated = service.translations.filter(
(x) => x.languages_id.code === currentLocale.directus
(x) => x.languages_id?.code === currentLocale.directus
);

service.translations = serviceTranslated;
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -811,10 +811,10 @@
resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45"
integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==

"@ircsignpost/signpost-base@16.6.0":
version "16.6.0"
resolved "https://registry.yarnpkg.com/@ircsignpost/signpost-base/-/signpost-base-16.6.0.tgz#5004bba5aaa7af22ceb0e6b59425067971664389"
integrity sha512-Jkx8BJkdcXNsViJwD7HQKIkuFoYfJ44kmSecDOwz3smUSix3qVkKA9kcYa6ax0f1D5r2amsCG/CzJjScPE2F5g==
"@ircsignpost/signpost-base@16.8.0":
version "16.8.0"
resolved "https://registry.yarnpkg.com/@ircsignpost/signpost-base/-/signpost-base-16.8.0.tgz#690fff93b8db272cf6609ee53520981afc517068"
integrity sha512-PPH7MDBbAuSpLrT3JEmcOkYIho6wbfoxgBkWO1yRa2J9IwawYmtv/OOndBJwc+ALTY55NNiYCmPsxwynaSGc2Q==

"@jridgewell/gen-mapping@^0.1.0":
version "0.1.1"
Expand Down

0 comments on commit 98b5fb3

Please sign in to comment.