Skip to content

chore: Upgrade i18next #1586

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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
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
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ export function IncludedContentsFilterSection({
const numberOfRunsOptions = useMemo(
() =>
numberOfRuns
? NUMBER_OF_RUN_OPTIONS.find(({ value }) => value === numberOfRuns) ??
null
? (NUMBER_OF_RUN_OPTIONS.find(({ value }) => value === numberOfRuns) ??
null)
: null,
[numberOfRuns],
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export function AnnotationConfidenceTable() {
values: [
isGroundTruth
? t('notApplicable')
: selectedAnnotationShape.annotation?.groundTruthUsed ?? '--',
: (selectedAnnotationShape.annotation?.groundTruthUsed ?? '--'),
],
className: 'text-sds-color-primitive-gray-500',
},
Expand All @@ -35,7 +35,7 @@ export function AnnotationConfidenceTable() {
values: [
isGroundTruth
? t('notApplicable')
: selectedAnnotationShape.annotation?.confidenceRecall ?? '--',
: (selectedAnnotationShape.annotation?.confidenceRecall ?? '--'),
],
className: 'text-sds-color-primitive-gray-500',
},
Expand All @@ -44,7 +44,7 @@ export function AnnotationConfidenceTable() {
values: [
isGroundTruth
? t('notApplicable')
: selectedAnnotationShape.annotation?.confidenceRecall ?? '--',
: (selectedAnnotationShape.annotation?.confidenceRecall ?? '--'),
],
className: 'text-sds-color-primitive-gray-500',
},
Expand Down
2 changes: 1 addition & 1 deletion frontend/packages/data-portal/app/components/Select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export function Select({
setAnchorEl(event.currentTarget)
setOpen(true)
}}
value={showActiveValue ? activeOption?.value ?? '' : undefined}
value={showActiveValue ? (activeOption?.value ?? '') : undefined}
/>

<DropdownMenu
Expand Down
5 changes: 2 additions & 3 deletions frontend/packages/data-portal/app/graphql/getRunByIdDiffer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,9 +289,8 @@ export function logIfHasDiff(
name: methodLink.custom_name,
},
}))
.sort(
(methodLinkA: any, methodLinkB: any) =>
methodLinkA.node.link?.localeCompare(methodLinkB.node.link),
.sort((methodLinkA: any, methodLinkB: any) =>
methodLinkA.node.link?.localeCompare(methodLinkB.node.link),
) ?? [],
},
methodType: file.annotation.method_type as Annotation_Method_Type_Enum,
Expand Down
2 changes: 1 addition & 1 deletion frontend/packages/data-portal/app/routes/runs.$id.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export default function RunByIdPage() {

const httpsPath = activeFile
? activeFile.node.httpsPath
: activeTomogram?.httpsMrcFile ?? undefined
: (activeTomogram?.httpsMrcFile ?? undefined)

const getFileSize = () => {
if (activeFile) {
Expand Down
2 changes: 1 addition & 1 deletion frontend/packages/data-portal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"express": "^4.21.1",
"framer-motion": "^10.16.4",
"graphql": "^16.8.1",
"i18next": "^23.7.6",
"i18next": "^24.2.2",
"i18next-browser-languagedetector": "^7.2.0",
"i18next-fs-backend": "^2.3.0",
"i18next-http-backend": "^2.4.1",
Expand Down
4 changes: 1 addition & 3 deletions frontend/packages/data-portal/tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,7 @@ export default {
.filter(([key]) => key.includes('to'))
.map(([key, value]) => {
return {
[`gradient-img-${key.slice(
key.indexOf('-') + 1,
)}`]: `${value}, var(--tw-background-image)`,
[`gradient-img-${key.slice(key.indexOf('-') + 1)}`]: `${value}, var(--tw-background-image)`,
}
})
return values.reduce((prev, curr) => ({ ...prev, ...curr }))
Expand Down
Loading
Loading