Fakultas Ilmu Komputer UI

Skip to content
Snippets Groups Projects
Commit 37424fc6 authored by Jonathan Chandra's avatar Jonathan Chandra
Browse files

Merge branch 'master' of...

parents efb1768b c69208c0
No related branches found
No related tags found
1 merge request!10Jonathan
......@@ -24,7 +24,7 @@ export default function Topic(props){
useEffect(() => {
const fetch = async () => {
const responseThreads = await axios.get(`http://localhost:4000/api/threads/pages/recent/?page=${currentPage}`)
const responseThreads = await axios.get(`${API_URL}/threads/pages/recent/?page=${currentPage}`)
setThread(responseThreads.data.data)
}
fetch()
......@@ -32,7 +32,7 @@ export default function Topic(props){
async function getThreadsByPage(pageNumber) {
setThread([]);
const threadsList = await axios.get(`http://localhost:4000/api/threads/pages/recent/?page=${pageNumber}`)
const threadsList = await axios.get(`${API_URL}/threads/pages/recent/?page=${pageNumber}`)
setThread(threadsList.data.data)
}
......
export const API_URL = 'https://diskuyapi.herokuapp.com/api'
// export const API_URL = 'http://localhost:4000/api'
\ No newline at end of file
// export const API_URL = 'https://diskuyapi.herokuapp.com/api'
export const API_URL = 'http://localhost:4000/api'
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment