Skip to content

Commit 76062e6

Browse files
committed
ref: code review
1 parent ea738bb commit 76062e6

File tree

6 files changed

+6
-48
lines changed

6 files changed

+6
-48
lines changed

src/core/usecases/synchronizeData/selectors.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@ const stepTitle = createSelector(state, (state: State) => {
8989
}
9090
switch (state.type) {
9191
case 'upload':
92-
return t('interrogationsProgress')
92+
return t('uploadingData')
9393
case 'download':
94-
return t('questionnairesProgress')
94+
return t('downloadingData')
9595
default:
9696
return ''
9797
}

src/core/usecases/synchronizeData/thunks.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const EXTERNAL_RESOURCES_ROOT_CACHE_NAME = 'cache-root-external'
1616

1717
export const thunks = {
1818
// Sync the data (upload first, download last)
19-
sync: (params: { resetMoved: true }) => async (dispatch, getState) => {
19+
sync: (params: { resetMoved: boolean }) => async (dispatch, getState) => {
2020
const state = getState()[name]
2121
if (state.stateDescription === 'running') {
2222
return

src/routes/pages/reset/PartialReset.tsx

Lines changed: 0 additions & 39 deletions
This file was deleted.

src/routes/pages/synchronize/SynchronizeData.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ export function SynchronizeData() {
1313
const { synchronizeData } = useCore().functions
1414

1515
useEffect(() => {
16-
synchronizeData.sync({ resetMoved: true })
16+
const resetMovedEnabled = import.meta.env.VITE_RESET_MOVED_ENABLED === "true";
17+
synchronizeData.sync({ resetMoved: resetMovedEnabled })
1718
}, [synchronizeData])
1819

1920
const { evtSynchronizeData } = useCore().evts

src/routes/routing/routes.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { Collect } from '@/routes/pages/collect/Collect'
33
import { DisplayEnvValues } from '@/routes/pages/env/DisplayEnvValues'
44
import { ErrorPage } from '@/routes/pages/error/Error'
55
import { ExternalRessources } from '@/routes/pages/external/External'
6-
import { PartialReset } from '@/routes/pages/reset/PartialReset'
76
import { Review } from '@/routes/pages/review/Review'
87
import { SynchronizeData } from '@/routes/pages/synchronize/SynchronizeData'
98
import { SynchronizeInterrogation } from '@/routes/pages/synchronize/SynchronizeInterrogation'
@@ -29,10 +28,6 @@ const getChildrenRoutes = () => {
2928
Component: Visualize,
3029
loader: visualizeLoader,
3130
},
32-
{
33-
path: '/reset',
34-
Component: PartialReset,
35-
},
3631
{
3732
path: '/synchronize',
3833
Component: SynchronizeData,

src/vite-env.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ type ImportMetaEnv = {
1010
VITE_TELEMETRY_ENABLED: string
1111
VITE_TELEMETRY_MAX_DELAY: string
1212
VITE_TELEMETRY_MAX_LENGTH: string
13+
VITE_RESET_MOVED_ENABLED: string
1314
BASE_URL: string
1415
MODE: string
1516
DEV: boolean

0 commit comments

Comments
 (0)