Skip to content

Commit a8bdef2

Browse files
Fixing errors and formatting
1 parent 8b3ecca commit a8bdef2

File tree

5 files changed

+7
-16
lines changed

5 files changed

+7
-16
lines changed

modules/dataquery/jsx/definefilters.addfiltermodal.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,8 @@ function AddFilterModal(props: {
185185
'<italic>at least one</italic> of the data points.'
186186
}
187187
ns="dataquery"
188-
values={{ scope: fieldDictionary.scope}}
189-
components={{italic: <i/>,}}
188+
values={{scope: fieldDictionary.scope}}
189+
components={{italic: <i/>}}
190190
/>
191191
</div>
192192
</div>;

modules/dataquery/jsx/definefilters.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -378,10 +378,10 @@ function DefineFilters(props: {
378378
<Trans
379379
i18nKey="Query matches <bold>{{count}}</bold> candidates"
380380
ns="dataquery"
381-
values={{ count: queryMatches}}
382-
components={{bold: <b/>,}}
381+
values={{count: queryMatches}}
382+
components={{bold: <b/>}}
383383
/>
384-
</div>;
384+
</div>;
385385
return (<div>
386386
{modal}
387387
{csvModalHTML}

modules/dataquery/jsx/index.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import {useDataDictionary, useCategories} from './hooks/usedatadictionary';
1818
import {ModuleDictionary, DictionaryCategory} from './types';
1919
// @ts-ignore
2020
import i18n from 'I18nSetup';
21-
import {withTranslation} from 'react-i18next';
2221

2322
import hiStrings from '../locale/hi/LC_MESSAGES/dataquery.json';
2423

@@ -250,8 +249,6 @@ function DataQueryApp(props: {
250249
declare const loris: any;
251250
window.addEventListener('load', () => {
252251
i18n.addResourceBundle('hi', 'dataquery', hiStrings);
253-
const TranslatedDataQueryApp = withTranslation(
254-
['dataquery', 'loris'])(DataQueryApp);
255252

256253
const element = document.getElementById('lorisworkspace');
257254
if (!element) {
@@ -260,7 +257,7 @@ window.addEventListener('load', () => {
260257
const root = createRoot(element);
261258

262259
root.render(
263-
<TranslatedDataQueryApp
260+
<DataQueryApp
264261
queryAdmin={loris.userHasPermission('dataquery_admin')}
265262
username={loris.user.username}
266263
/>,

modules/dataquery/jsx/welcome.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,7 @@ import {APIQueryField} from './types';
1313
import {FullDictionary} from './types';
1414
import {FlattenedField, FlattenedQuery, VisitOption} from './types';
1515
import {useTranslation} from 'react-i18next';
16-
// @ts-ignore
17-
import i18n from 'I18nSetup';
18-
import {withTranslation} from 'react-i18next';
19-
import {createRoot} from 'react-dom/client';
20-
21-
import hiStrings from '../locale/hi/LC_MESSAGES/dataquery.json';
16+
import 'I18nSetup';
2217

2318
/**
2419
* Return the welcome tab for the DQT

tsconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,5 @@
1818
"es6", "dom", "es2017"
1919
],
2020
"strict" : true,
21-
"resolveJsonModule": true
2221
}
2322
}

0 commit comments

Comments
 (0)