aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/components/ViewPaste.js
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src/components/ViewPaste.js')
-rw-r--r--frontend/src/components/ViewPaste.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/frontend/src/components/ViewPaste.js b/frontend/src/components/ViewPaste.js
index ebdc950..2d69544 100644
--- a/frontend/src/components/ViewPaste.js
+++ b/frontend/src/components/ViewPaste.js
@@ -15,7 +15,7 @@ function fmtDateStr(dateString) {
}
const ViewPaste = (props) => {
- const [title, setTitle] = useState('untitled paste');
+ const [title, setTitle] = useState('fetching paste...');
const [content, setContent] = useState('');
const [hasPass, setHasPass] = useState(false);
const [enteredPass, setEnteredPass] = useState('');
@@ -64,8 +64,7 @@ const ViewPaste = (props) => {
useEffect(() => {
FetchPaste(props.hash)
.then((response) => {
- const data = response.data
- setStateFromData(data)
+ setStateFromData(response.data)
}).catch((error) => {
const resp = error.response