Skip to content

Commit 1d5d346

Browse files
committed
50
1 parent 065f7ca commit 1d5d346

File tree

3 files changed

+22
-2
lines changed

3 files changed

+22
-2
lines changed

db.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,27 @@
2020
"publish": true,
2121
"createdAt": 1646350534135,
2222
"id": 7
23+
},
24+
{
25+
"title": "react",
26+
"body": "react",
27+
"publish": false,
28+
"createdAt": 1647211176299,
29+
"id": 8
30+
},
31+
{
32+
"title": "recoiljs",
33+
"body": "recoiljs",
34+
"publish": false,
35+
"createdAt": 1647211385146,
36+
"id": 9
37+
},
38+
{
39+
"title": "test",
40+
"body": "test",
41+
"publish": false,
42+
"createdAt": 1647211425309,
43+
"id": 10
2344
}
2445
]
2546
}

src/components/BlogForm.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ const BlogForm = ({ editing }) => {
5858
publish,
5959
createdAt: Date.now()
6060
}).then(() => {
61-
history.push('/blogs');
61+
history.push('/admin');
6262
})
6363
}
6464
};

src/components/BlogList.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import axios from 'axios';
22
import { useState, useEffect } from 'react';
33
import Card from '../components/Card';
4-
import { Link } from 'react-router-dom';
54
import { useHistory } from 'react-router';
65
import LoadingSpinner from '../components/LoadingSpinner';
76
import { bool } from 'prop-types';

0 commit comments

Comments
 (0)