Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion components/AddSiteModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@ const AddSiteModal = ({ children }) => {
const { isOpen, onOpen, onClose } = useDisclosure();
const { handleSubmit, register } = useForm();

const onCreateSite = ({ name, url }) => {
const onCreateSite = ({ name, description, url }) => {
const newSite = {
authorId: auth.user.uid,
createdAt: new Date().toISOString(),
name,
description,
url
};

Expand Down Expand Up @@ -93,6 +94,16 @@ const AddSiteModal = ({ children }) => {
})}
/>
</FormControl>
<FormControl>
<FormLabel>Description</FormLabel>
<Input
placeholder="Description"
name="description"
ref={register({
required: false
})}
/>
</FormControl>
</ModalBody>

<ModalFooter>
Expand Down
2 changes: 2 additions & 0 deletions components/SiteTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const SiteTable = ({ sites }) => {
<Th>Name</Th>
<Th>Site Link</Th>
<Th>Feedback Link</Th>
<Th>Description</Th>
<Th>Date Added</Th>
<Th>{''}</Th>
</Tr>
Expand All @@ -30,6 +31,7 @@ const SiteTable = ({ sites }) => {
<Link>View Feedback</Link>
</NextLink>
</Td>
<Td>{site.description}</Td>
<Td>{format(parseISO(site.createdAt), 'PPpp')}</Td>
</Box>
))}
Expand Down