Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release: dependency updates + minor fixes 30th Sep 2024 #2245

Merged
merged 13 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import deepmerge from 'deepmerge';
// IMP - Import any new translation file here in `userMessages` add `defaultMessages`, to enable translation auto complete.
export default getRequestConfig(async ({ locale }) => {
const userMessages = {
...(await import(`./public/static/locales/${locale}/allProjects.json`))
.default,
...(await import(`./public/static/locales/${locale}/bulkCodes.json`))
.default,
...(await import(`./public/static/locales/${locale}/common.json`)).default,
Expand All @@ -28,6 +30,8 @@ export default getRequestConfig(async ({ locale }) => {
.default,
...(await import(`./public/static/locales/${locale}/profile.json`)).default,
...(await import(`./public/static/locales/${locale}/project.json`)).default,
...(await import(`./public/static/locales/${locale}/projectDetails.json`))
.default,
...(await import(`./public/static/locales/${locale}/redeem.json`)).default,
...(await import(`./public/static/locales/${locale}/registerTrees.json`))
.default,
Expand All @@ -40,6 +44,7 @@ export default getRequestConfig(async ({ locale }) => {
};

const defaultMessages = {
...(await import(`./public/static/locales/en/allProjects.json`)).default,
...(await import(`./public/static/locales/en/bulkCodes.json`)).default,
...(await import(`./public/static/locales/en/common.json`)).default,
...(await import(`./public/static/locales/en/country.json`)).default,
Expand All @@ -56,6 +61,7 @@ export default getRequestConfig(async ({ locale }) => {
...(await import(`./public/static/locales/en/planetcash.json`)).default,
...(await import(`./public/static/locales/en/profile.json`)).default,
...(await import(`./public/static/locales/en/project.json`)).default,
...(await import(`./public/static/locales/en/projectDetails.json`)).default,
...(await import(`./public/static/locales/en/redeem.json`)).default,
...(await import(`./public/static/locales/en/registerTrees.json`)).default,
...(await import(`./public/static/locales/en/tenants.json`)).default,
Expand Down
1,530 changes: 788 additions & 742 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"@types/react-lazyload": "^2.6.0",
"@types/supercluster": "^7.1.0",
"@vercel/kv": "^1.0.1",
"apexcharts": "^3.37.0",
"apexcharts": "^3.54.0",
"connection-string": "^4.3.6",
"d3-ease": "^2.0.0",
"date-fns": "^2.27.0",
Expand All @@ -101,7 +101,7 @@
"negotiator": "^0.6.3",
"next": "^13.5.7",
"next-connect": "^0.13.0",
"next-intl": "^3.17.6",
"next-intl": "^3.19.1",
"next-useragent": "^2.7.0",
"node-cache": "^5.1.2",
"npm": "^10.2.2",
Expand All @@ -115,7 +115,7 @@
"react-dom": "^18.2.0",
"react-dropzone": "^11.4.0",
"react-gtm-module": "^2.0.11",
"react-hook-form": "^7.44.2",
"react-hook-form": "^7.53.0",
"react-insta-stories": "^2.2.5",
"react-json-editor-ajrm": "^2.5.13",
"react-lazyload": "^3.2.0",
Expand Down
1 change: 0 additions & 1 deletion pages/api/data-explorer/map/plant-location/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ handler.post(async (req, response) => {
}

const qRes = await db.query<UncleanPlantLocations[]>(query, values);
console.log('qRes:', qRes);

const plantLocations: SinglePlantLocationApiResponse[] = qRes.map(
(plantLocation) => ({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
import { useLocale } from 'next-intl';
import { getFormattedNumber } from '../../../../../../../utils/getFormattedNumber';
import styles from './index.module.scss';

interface Props {
headerTitle: string;
bodyTitle: string;
value: string;
locale: string;
}

export const Tooltip = ({ headerTitle, bodyTitle, value }: Props) => {
const locale = useLocale();

export const Tooltip = ({ headerTitle, bodyTitle, value, locale }: Props) => {
return (
<div className={styles.container}>
<div className={styles.header}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ export const SpeciesPlanted = () => {
headerTitle={w.globals.categoryLabels[dataPointIndex]}
bodyTitle={'Planted Species'}
value={s[0][dataPointIndex]}
locale={locale}
/>
);
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
import { useLocale } from 'next-intl';
import { getFormattedNumber } from '../../../../../../../utils/getFormattedNumber';
import styles from './index.module.scss';

interface Props {
headerTitle: string;
bodyTitle: string;
value: string;
locale: string;
}

export const Tooltip = ({ headerTitle, bodyTitle, value }: Props) => {
const locale = useLocale();

export const Tooltip = ({ headerTitle, bodyTitle, value, locale }: Props) => {
return (
<div className={styles.container}>
<div className={styles.header}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,7 @@ export const TreePlanted = () => {
headerTitle={(categories as DaysCategories[])[dataPointIndex].label}
bodyTitle={t('treesPlanted')}
value={`${seriesData[dataPointIndex]}`}
locale={locale}
/>
);
case TIME_FRAME.WEEKS:
Expand All @@ -450,6 +451,7 @@ export const TreePlanted = () => {
}`}
bodyTitle={t('treesPlanted')}
value={`${seriesData[dataPointIndex]}`}
locale={locale}
/>
);
case TIME_FRAME.MONTHS:
Expand All @@ -460,6 +462,7 @@ export const TreePlanted = () => {
} ${(categories as MonthsCategories[])[dataPointIndex].year}`}
bodyTitle={t('treesPlanted')}
value={`${seriesData[dataPointIndex]}`}
locale={locale}
/>
);
case TIME_FRAME.YEARS:
Expand All @@ -468,6 +471,7 @@ export const TreePlanted = () => {
headerTitle={(categories as DaysCategories[])[dataPointIndex].label}
bodyTitle={t('treesPlanted')}
value={`${seriesData[dataPointIndex]}`}
locale={locale}
/>
);
default:
Expand Down
Loading