Merge branch 'master' of https://gitlab.chiefsoft.net/MyFit/www-myfit into myFit--BlogDetails
This commit is contained in:
@@ -9,6 +9,7 @@ import SiteService from "../../../vendors/service/siteService";
|
||||
|
||||
const Main = ({ brdcum, bgimg }) => {
|
||||
const [blogData, setBlogData] = useState([]);
|
||||
console.log(blogData);
|
||||
|
||||
let api = new SiteService();
|
||||
useEffect(() => {
|
||||
|
||||
@@ -21,6 +21,10 @@ const Main = ({ brdcum }) => {
|
||||
}, [blogData]);
|
||||
|
||||
const getBlogData = async () => {
|
||||
/*
|
||||
The reason for this, is because of the breaking I had when building the blog
|
||||
I decided to save to the local storage for an hour so that it won't need to be going to the server again but I can change this
|
||||
*/
|
||||
// Saving it locally to avoid interfering with server
|
||||
if (localStorage.getItem("myFit--blogData") == null) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user