Remove context for state management

This commit is contained in:
Ariful Alam committed 2022-03-19 16:34:13 +06:00
1 parent b69ced8ce0
commit ab55fa68f1
13 files changed
+61 -140

No files matched your search

+2 -4
View File
@@ -1,8 +1,7 @@
import { getDevtoArticle, getMediumArticle } from 'article-api';
import moment from 'moment';
import { Fragment, useContext, useEffect, useState } from 'react';
import { Fragment, useEffect, useState } from 'react';
import { CgHashtag } from 'react-icons/cg';
import { LoadingContext } from '../../contexts/LoadingContext';
import config from '../../ezprofile.config';
import { ga, skeleton } from '../../helpers/utils';
import LazyImage from '../lazy-image';
@@ -21,9 +20,8 @@ const displaySection = () => {
}
};
const Blog = () => {
const Blog = ({loading}) => {
const [articles, setArticles] = useState(null);
const { loading } = useContext(LoadingContext);
useEffect(() => {
if (displaySection()) {