Skip to content

Commit

Permalink
fix(eslint): remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
lailabjil committed Mar 11, 2024
1 parent 7edd46a commit c0e1f49
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ const App = () => {

//auth.userManager.startSilentRenew();
promisesToWait.push(
initializeDatas(setError).then(data => {
initializeDatas(setError).then(() => {
setInitialized(true);
return initPropsAuth(auth).then(() => setInitialized(true));
}),
Expand Down
28 changes: 28 additions & 0 deletions src/pages/home-surveyed/HomeSurveyed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { ReactComponent as DisconnectIcon } from "assets/illustration/disconnect
import logo from "assets/illustration/logo.png";
import { ReactComponent as HelpIcon } from "assets/illustration/mui-icon/help.svg";
import { ReactComponent as HomeIcon } from "assets/illustration/mui-icon/home.svg";
import { ReactComponent as LockIcon } from "assets/illustration/mui-icon/lock.svg";
import { ReactComponent as PowerSettingsIcon } from "assets/illustration/mui-icon/power-settings.svg";
import { ReactComponent as RemoveCircleIcon } from "assets/illustration/mui-icon/remove-circle.svg";
import { ReactComponent as ReminderNoteImg } from "assets/illustration/reminder-note.svg";
Expand Down Expand Up @@ -345,6 +346,33 @@ const HomeSurveyedPage = () => {
);
})}
</Box>
<Box className={classes.navButtonsBox}>
<FlexCenter className={classes.innerButtonsBox}>
<Button
variant="outlined"
onClick={navBack}
className={cx(classes.navButton, classes.navBackButton)}
id="return-button"
>
<Box className={classes.label}>{t("common.navigation.back")}</Box>
</Button>
<Button
variant="contained"
onClick={validateSurveys}
className={cx(classes.navButton, classes.validAllSurveysButton)}
>
{t("page.reviewer-home.validate-all-empties-surveys")}
</Button>
<Button
variant="contained"
onClick={lockSurveys}
className={cx(classes.navButton)}
disabled={!navigator.onLine}
>
<LockIcon aria-label={t("accessibility.asset.mui-icon.padlock")} />
</Button>
</FlexCenter>
</Box>
</>,
);
};
Expand Down
1 change: 0 additions & 1 deletion src/pages/surveys-overview/SurveysOverview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ const SurveysOverviewPage = () => {

const refreshHouseholds = useCallback(() => {
setRefreshing(true);
const promisesToWait: Promise<any>[] = [];
return initializeListSurveys(setError).then(() => {
return refreshSurveyData(setError).finally(() => {
setRefreshing(true);
Expand Down
2 changes: 0 additions & 2 deletions src/service/survey-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ let userDatasWorkTime: UserSurveys[] = [];
let userDatas: UserSurveys[] = [];
let surveysData: UserSurveys[] = [];
let initData = false;
let authData = null;

const toIgnoreForRoute = [
FieldNameEnum.PLACE,
Expand Down Expand Up @@ -149,7 +148,6 @@ const initPropsAuth = (auth: AuthContextProps): Promise<DataState> => {
},
};
return lunaticDatabase.save(DATA_STATE, dataState).then(() => {
authData = dataState.data.userData;
return dataState;
});
};
Expand Down

0 comments on commit c0e1f49

Please sign in to comment.