diff --git a/src/api/posts.api.js b/src/api/posts.api.js index f1f4399..68a5a46 100644 --- a/src/api/posts.api.js +++ b/src/api/posts.api.js @@ -11,7 +11,7 @@ export const postApi = { return (await axios.get(`${path}/${id}`)).data; }, async createNewPost(title, content) { - const location = locationUtils.getCurrentLocation(); + const location = await locationUtils.getCurrentLocation(); if(location.lon && location.lat) { await axios.post(`${path}s`, { "authorID": 1, diff --git a/src/components/Post.js b/src/components/Post.js index 70fd3f9..c4b5f4c 100644 --- a/src/components/Post.js +++ b/src/components/Post.js @@ -2,7 +2,7 @@ import React from 'react'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { faCaretUp, faCaretDown } from '@fortawesome/free-solid-svg-icons'; -const Post = ({ post, upvotePost, downvotePost }) => { +const Post = ({ post, vote }) => { return (