Skip to content

Commit

Permalink
Bump
Browse files Browse the repository at this point in the history
  • Loading branch information
Corofides committed Nov 8, 2023
1 parent 26955fb commit 842da3e
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/Hooks/usePosts/usePosts.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import {DateTime} from 'luxon';

const usePosts = () => {

//const {result: cachedPosts, loading: cachedLoading} = useFetch( process.env.REACT_APP_SITE_URL + '/posts/posts.json');

const [posts, setPosts] = useState([]);
const [loading, setLoading] = useState(true);
const [error, setError] = useState(false);
Expand All @@ -16,13 +14,8 @@ const usePosts = () => {
fetch( process.env.REACT_APP_SITE_URL + '/posts/posts.json').then(response => response.json()).then((result) => {
setPosts(result);
setLoading(false);
//return;
});


//setPosts([]);
//setLoading(true);

}, []);

const getPost = (id) => {
Expand All @@ -33,7 +26,6 @@ const usePosts = () => {

return {posts, loading, getPost, publishedPosts}


};

export default usePosts;

0 comments on commit 842da3e

Please sign in to comment.