diff --git a/client/src/components/SnippetDisplay/SnippetDisplay.jsx b/client/src/components/SnippetDisplay/SnippetDisplay.jsx
index c15fc78..5c98f9b 100644
--- a/client/src/components/SnippetDisplay/SnippetDisplay.jsx
+++ b/client/src/components/SnippetDisplay/SnippetDisplay.jsx
@@ -20,7 +20,7 @@ const SnippetDisplay = ({ selectedSnippet, getSnippet }) => {
language: '',
comments: '',
storedCode: '',
- tags: [],
+ tags: []
};
const [copied, setCopied] = useState(false);
@@ -40,7 +40,7 @@ const SnippetDisplay = ({ selectedSnippet, getSnippet }) => {
const deleteSnippet = (snippetId) => {
fetch('/snippets?' + new URLSearchParams({ snippetId }), {
- method: 'DELETE',
+ method: 'DELETE'
})
.then((response) => {
if (response.ok) {
@@ -52,7 +52,7 @@ const SnippetDisplay = ({ selectedSnippet, getSnippet }) => {
return {
log: `SnippetDisiplay.deleteSnippet: Error: ${err}`,
status: err.status,
- message: 'There was an error deleting snippet.',
+ message: 'There was an error deleting snippet.'
};
});
};
@@ -61,7 +61,7 @@ const SnippetDisplay = ({ selectedSnippet, getSnippet }) => {
fetch(`/snippets?${new URLSearchParams({ snippetId })}`, {
method: 'PUT',
headers: { 'Content-type': 'application/json' },
- body: JSON.stringify(currentDisplay),
+ body: JSON.stringify(currentDisplay)
})
.then((response) => {
//Are we using this response anywhere? IF not, delete this.
@@ -76,63 +76,69 @@ const SnippetDisplay = ({ selectedSnippet, getSnippet }) => {
return {
log: `SnippetDisplay.editSnippet: Error: ${err}`,
status: err.status,
- message: 'There was an error editing code snippet.',
+ message: 'There was an error editing code snippet.'
};
});
};
const displayContent = (
-
+
-
-
Title:
+
+ Title:
{
if (editButtonState) {
setCurrentDisplay({
...currentDisplay,
- title: e.target.value,
+ title: e.target.value
});
}
- }}>
+ }}
+ >
-
-
Language:
+
+ Language:
{
if (editButtonState) {
setCurrentDisplay({
...currentDisplay,
- language: e.target.value,
+ language: e.target.value
});
}
- }}>
+ }}
+ >
-
-
Comments:
+
+ Comments:
{
if (editButtonState) {
setCurrentDisplay({
...currentDisplay,
- comments: e.target.value,
+ comments: e.target.value
});
}
- }}>
+ }}
+ >
{
if (editButtonState) {
setCurrentDisplay({ ...currentDisplay, tags: e });
@@ -145,15 +151,17 @@ const SnippetDisplay = ({ selectedSnippet, getSnippet }) => {
{\n console.log(\'Hello World!)\n}'}
onChange={(e) => {
setCurrentDisplay({ ...currentDisplay, storedCode: e });
- }}>
+ }}
+ >