|
1 | 1 | import { useAllLinkTypes } from '../../hooks/projects.hooks'; |
2 | 2 | import LoadingIndicator from '../LoadingIndicator'; |
3 | 3 | import ErrorPage from '../../pages/ErrorPage'; |
4 | | -import { Button, IconButton, MenuItem, Select, TextField } from '@mui/material'; |
| 4 | +import { IconButton, MenuItem, Select, TextField } from '@mui/material'; |
5 | 5 | import { FieldArrayWithId, UseFieldArrayAppend, UseFieldArrayRemove, UseFormRegister, UseFormWatch } from 'react-hook-form'; |
6 | 6 | import DeleteIcon from '@mui/icons-material/Delete'; |
7 | 7 | import { getRequiredLinkTypeNames } from '../../utils/link.utils'; |
8 | | -import { ProjectEditFormInput } from '../../pages/ProjectDetailPage/ProjectEdit/ProjectEditContainer'; |
| 8 | +import { ProjectFormInput } from '../../pages/ProjectDetailPage/ProjectForm/ProjectForm'; |
9 | 9 | import { Box } from '@mui/system'; |
| 10 | +import { NERButton } from '../NERButton'; |
10 | 11 |
|
11 | 12 | const LinksEditView: React.FC<{ |
12 | 13 | ls: FieldArrayWithId[]; |
13 | | - register: UseFormRegister<ProjectEditFormInput>; |
14 | | - watch: UseFormWatch<ProjectEditFormInput>; |
| 14 | + register: UseFormRegister<ProjectFormInput>; |
| 15 | + watch: UseFormWatch<ProjectFormInput>; |
15 | 16 | append: UseFieldArrayAppend<any, any>; |
16 | 17 | remove: UseFieldArrayRemove; |
17 | 18 | }> = ({ ls, register, append, remove, watch }) => { |
@@ -66,14 +67,14 @@ const LinksEditView: React.FC<{ |
66 | 67 | ); |
67 | 68 | })} |
68 | 69 | {availableOptions.length > 0 && ( |
69 | | - <Button |
| 70 | + <NERButton |
70 | 71 | variant="contained" |
71 | | - color="success" |
| 72 | + color="primary" |
72 | 73 | onClick={() => append({ linkId: '-1', url: '', linkTypeName: '-1' })} |
73 | 74 | sx={{ my: 2, width: 'max-content' }} |
74 | 75 | > |
75 | 76 | + Add New Link |
76 | | - </Button> |
| 77 | + </NERButton> |
77 | 78 | )} |
78 | 79 | </> |
79 | 80 | ); |
|
0 commit comments