Skip to content

Commit

Permalink
feat: updates radio text and order (#274)
Browse files Browse the repository at this point in the history
  • Loading branch information
emi-hi authored Apr 8, 2024
1 parent 1d4deff commit fe18401
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion frontend/src/uploads/UploadContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const UploadContainer = () => {
setDatasetList(response.data);
setRefresh(false);
axios.get(ROUTES_USERS.CURRENT).then((currentUserResp) => {
if (currentUserResp.data.user_permissions.admin === true) {
if (currentUserResp.data && currentUserResp.data.user_permissions && currentUserResp.data.user_permissions.admin === true) {
setAdminUser(true);
setCurrentUser(currentUserResp.data.idir);
}
Expand Down
9 changes: 5 additions & 4 deletions frontend/src/uploads/components/UploadPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,19 @@ const UploadPage = (props) => {
value={replaceData ? "replace" : "add"}
name="radio-buttons-group"
onChange={handleRadioChange}
defaultValue="add"
>
<FormControlLabel
disabled={datasetSelected ? false: true}
value={"replace"}
value="add"
control={<Radio />}
label="Replace existing data"
label="Add to existing data (default)"
/>
<FormControlLabel
disabled={datasetSelected ? false: true}
value={"add"}
value="replace"
control={<Radio />}
label="Add to existing data"
label="Replace existing data (data cannot be restored, proceed only if you are certain that the new file contains all required data)."
/>
</RadioGroup>
</FormControl>
Expand Down

0 comments on commit fe18401

Please sign in to comment.