- {isPending && Loading Election...
}
- {!authSession.isLoggedIn() && Must be logged in to create elections
}
- {authSession.isLoggedIn() && data && data.election &&
-
- }
- {postIsPending && Submitting...
}
- {postError && {postError}
}
-
- )
-}
-
-export default DuplicateElection
diff --git a/frontend/src/components/ElectionForm/Races/AddRace.tsx b/frontend/src/components/ElectionForm/Races/AddRace.tsx
index bee1369d..782b5ac6 100644
--- a/frontend/src/components/ElectionForm/Races/AddRace.tsx
+++ b/frontend/src/components/ElectionForm/Races/AddRace.tsx
@@ -31,7 +31,8 @@ export default function AddRace() {
variant="contained"
fullWidth={false}
sx={{ borderRadius: 28, backgroundColor: 'brand.green' }}
- onClick={handleOpen}>
+ onClick={handleOpen}
+ disabled={election.state!=='draft'}>
Add