Skip to content

Commit

Permalink
chore: optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
turban committed Feb 6, 2025
1 parent c26da17 commit c93ddf6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
7 changes: 2 additions & 5 deletions i18n/en.pot
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ msgstr ""
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"POT-Creation-Date: 2025-02-05T10:45:16.315Z\n"
"PO-Revision-Date: 2025-02-05T10:45:16.315Z\n"
"POT-Creation-Date: 2025-02-06T14:06:33.277Z\n"
"PO-Revision-Date: 2025-02-06T14:06:33.277Z\n"

msgid "About this app"
msgstr "About this app"
Expand Down Expand Up @@ -746,9 +746,6 @@ msgstr "Aggregation levels"
msgid "Assign all org unit levels"
msgstr "Assign all org unit levels"

msgid "Legend: \"{{name}}\""
msgstr "Legend: \"{{name}}\""

msgid "Start value"
msgstr "Start value"

Expand Down
4 changes: 2 additions & 2 deletions src/components/import/ImportPage.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useConfig } from '@dhis2/app-runtime'
import i18n from '@dhis2/d2-i18n'
import { Card, Button } from '@dhis2/ui'
import { useState, useEffect } from 'react'
import { useState, useMemo, useEffect } from 'react'
import useOrgUnitCount from '../../hooks/useOrgUnitCount.js'
import {
getDefaultImportPeriod,
Expand Down Expand Up @@ -32,7 +32,7 @@ const ImportPage = () => {
const standardPeriod = getStandardPeriod(period) // ISO 8601 used by GEE
const [startExtract, setStartExtract] = useState(false)
const orgUnitCount = useOrgUnitCount(orgUnits?.parent?.id, orgUnits?.level)
const periodCount = getPeriods(period).length
const periodCount = useMemo(() => getPeriods(period).length, [period])
const valueCount = orgUnitCount * periodCount
const periodType = periodTypes
.find((type) => type.id === period.periodType)
Expand Down

0 comments on commit c93ddf6

Please sign in to comment.