Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
koechkevin committed Jul 5, 2024
1 parent e55ebfc commit 2cd9fc0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions apps/charterafrica/.env
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ PAYLOAD_PUBLIC_LOCALES="en, fr, pt"
SENTRY_ENVIRONMENT=local
SENTRY_ORG=code-for-africa
SENTRY_PROJECT=charterafrica
NEXT_PUBLIC_DEFAULT_LOCALE=en
13 changes: 12 additions & 1 deletion apps/charterafrica/src/lib/data/common/processPageTools.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,22 @@ import {
TOOL_COLLECTION,
ORGANIZATION_COLLECTION,
} from "@/charterafrica/payload/utils/collections";
import { defaultLocale, locales } from "@/charterafrica/payload/utils/locales";
import queryString from "@/charterafrica/utils/ecosystem/queryString";
import formatDateTime from "@/charterafrica/utils/formatDate";
import labelsPerLocale from "@/charterafrica/utils/translationConstants";

const locales = (
process.env.NEXT_PUBLIC_LOCALES || process.env.PAYLOAD_PUBLIC_LOCALES
)
?.split(",")
?.map((l) => l.trim())
.filter(Boolean);
const defaultLocale =
(
process.env.NEXT_PUBLIC_DEFAULT_LOCALE ||
process.env.PAYLOAD_PUBLIC_DEFAULT_LOCALE
)?.trim() || locales?.[0];

const queryBuilder = (query) => {
const { search, theme, homeCountry, classification } = query;
const where = {};
Expand Down

0 comments on commit 2cd9fc0

Please sign in to comment.