Skip to content
This repository has been archived by the owner on Nov 13, 2024. It is now read-only.

Commit

Permalink
convert useEffect dependencies from array to string
Browse files Browse the repository at this point in the history
  • Loading branch information
erinz2020 committed Nov 3, 2023
1 parent d062293 commit 174bbb3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 225 deletions.
4 changes: 0 additions & 4 deletions src/AuthenticatedSwitch.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import AuthenticatedAppHeader from './components/AuthenticatedAppHeader';
import SaveCustomField from './pages/fieldManagement/settings/saveField/SaveField';
import GeneralSettings from './pages/generalSettings/GeneralSettings';
import SiteStatus from './pages/siteStatus/SiteStatus';
import SplashSettings from './pages/splashSettings/SplashSettings';
import FieldManagement from './pages/fieldManagement/FieldManagement';
import UserManagement from './pages/userManagement/UserManagement';
import AdminActions from './pages/adminActions/AdminActions';
Expand Down Expand Up @@ -100,9 +99,6 @@ export default function AuthenticatedSwitch({
<SiteSetup />
) : (
<Switch location={location}>
<Route path="/settings/front-page" exact>
<SplashSettings />
</Route>
<Route path="/settings/front-page/preview">
<Splash />
</Route>
Expand Down
16 changes: 8 additions & 8 deletions src/pages/reportSighting/ReportForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export default function ReportForm({
useState({});

useEffect(() => {
if (sightingFieldSchemas.length === 0) return;
console.log('>>>>>>>>>>>>>');
const initialDefaultSightingFormValues = getInitialFormValues(
defaultSightingSchemas,
);
Expand All @@ -155,12 +155,12 @@ export default function ReportForm({
setEncounterFormValues(initialDefaultEncounterFormValues);
setCustomEncounterFormValues(initialCustomEncounterFormValues);
}, [
customEncounterSchemas,
customSightingSchemas,
defaultEncounterSchemas,
defaultSightingSchemas,
sightingFieldSchemas,
encounterFieldSchemas,
customEncounterSchemas.join('-'),
customSightingSchemas.join('-'),
defaultEncounterSchemas.join('-'),
defaultSightingSchemas.join('-'),
sightingFieldSchemas.join('-'),
encounterFieldSchemas.join('-'),
]);

const requiredDefaultSightingSchemas =
Expand Down Expand Up @@ -275,7 +275,7 @@ export default function ReportForm({
} = usePostAssetGroup();

const submitReport = async () => {
checkRequired();
// checkRequired();
if (formValid) {
const report =
sightingType === 'one'
Expand Down
213 changes: 0 additions & 213 deletions src/pages/splashSettings/SplashSettings.jsx

This file was deleted.

0 comments on commit 174bbb3

Please sign in to comment.