Skip to content

Commit e356c1e

Browse files
fix menu and header
1 parent 851ba2a commit e356c1e

File tree

11 files changed

+59
-24
lines changed

11 files changed

+59
-24
lines changed

.env

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
# REACT_APP_API_BASE_URL='http://localhost:8000'
88

99
# IMAGE_BASE_URL='http://localhost:8000/images/'
10-
REACT_APP_API_BASE_URL='https:///mpeoplesdatahub.com'
10+
REACT_APP_API_BASE_URL='https:///tnreaders.in'
1111

12-
IMAGE_BASE_URL='https:///mpeoplesdatahub.com/images/'
12+
IMAGE_BASE_URL='https:///tnreaders.in/images/'

build.zip

6.46 MB
Binary file not shown.

public/assets/favicon.ico

1.12 KB
Binary file not shown.

public/assets/favicon.jpg

-4.73 KB
Binary file not shown.

public/assets/logo.jpeg

-9.61 KB
Loading

src/components/Blog.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,11 @@ const Blog = ({ title, isHomepage }) => {
219219
</div>
220220
</section>
221221
) : (
222-
isHomepage === 0 && <NoPost />
222+
<section className='pb-60'>
223+
{subCategory.length ? <SubCategoryBreadcrumb subCategories={subCategory} title={title} /> : ''}
224+
<Breadcrumb title={title} />
225+
{isHomepage === 0 && <NoPost />}
226+
</section>
223227
)}
224228
</Suspense>
225229
</>

src/components/home/SpotLight.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,11 @@ const SpotLightSection = () => {
5959
});
6060
};
6161
fetchLikes();
62-
}
63-
if (clickedBlogArticleIconId.includes(linkId)) {
64-
setClickedBlogArticleIconId(clickedBlogArticleIconId.filter((id) => id !== linkId));
65-
} else {
66-
setClickedBlogArticleIconId([...clickedBlogArticleIconId, linkId]);
62+
if (clickedBlogArticleIconId.includes(linkId)) {
63+
setClickedBlogArticleIconId(clickedBlogArticleIconId.filter((id) => id !== linkId));
64+
} else {
65+
setClickedBlogArticleIconId([...clickedBlogArticleIconId, linkId]);
66+
}
6767
}
6868
};
6969

src/config/constant.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const NEWS_CATEGORY = 'news';
22
const ARTICLE_CATEGORY = 'article';
33

44
const DEFAULT_LOGO = '../assets/logo.jpeg';
5-
const DEFAULT_FAVICON = '../assets/favicon.jpg';
5+
const DEFAULT_FAVICON = '../assets/favicon.ico';
66

77
const DETAIL_CATEGORY = 'news-detail';
88
const DETAIL_ARTICLE = 'article-detail';

src/config/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import axios from 'axios';
22

33
// const IMAGE_BASE_URL = process.env.IMAGE_BASE_URL || 'https://tnreaders.in/images/';
4-
// const IMAGE_BASE_URL = 'http://localhost:8000/images/';
5-
const IMAGE_BASE_URL = 'https://mpeoplesdatahub.com/images/';
4+
const IMAGE_BASE_URL = 'http://localhost:8000/images/';
5+
// const IMAGE_BASE_URL = 'https://tnreaders.in/images/';
66
const DEFAULT_POST = 'default_post.png';
77
const DEFAULT_CATEGORY = 'default_category.jpeg';
88

99
const axiosInstance = axios.create({
10-
baseURL: process.env.REACT_APP_API_BASE_URL || 'https:///mpeoplesdatahub.com/', // Default URL
11-
// baseURL: 'http://localhost:8000', // Default URL
10+
// baseURL: process.env.REACT_APP_API_BASE_URL || 'https:///tnreaders.in/', // Default URL
11+
baseURL: 'http://localhost:8000', // Default URL
1212
});
1313

1414
export default axiosInstance;

src/layouts/Header.js

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,21 @@ const Header = () => {
2222
const [showToggleMenu, setShowToggleMenu] = useState(false);
2323
const mobileMenuRef = useRef(null);
2424
const [activeCategory, setActiveCategory] = useState({ category: null, show: false });
25-
const moreCategories = categories.filter((category) => category.position === 'more');
26-
const mainCategories = categories.filter((category) => category.position === 'main');
25+
const [mainCategories, setMainCategories] = useState([]);
26+
const [moreCategories, setMoreCategories] = useState([]);
27+
28+
useEffect(() => {
29+
const main = categories.filter((category) => category.position === 'main');
30+
const more = categories.filter((category) => category.position === 'more');
31+
32+
if (main.length > 7) {
33+
setMoreCategories([...more, ...main.slice(7)]);
34+
setMainCategories(main.slice(0, 7));
35+
} else {
36+
setMainCategories(main);
37+
setMoreCategories(more);
38+
}
39+
}, [categories]);
2740

2841
useEffect(() => {
2942
dispatch(fetchCategories());
@@ -249,10 +262,10 @@ const Header = () => {
249262
</ul>
250263
</div>
251264
<div className='row left-menu-store my-2'>
252-
<Link to='https://play.google.com/store/' className='my-2'>
265+
{/* <Link to='https://play.google.com/store/' className='my-2'>
253266
{' '}
254267
<img src={googleplayimg} />{' '}
255-
</Link>
268+
</Link> */}
256269
<div className='left-menu-social mb-10'>
257270
<ul className='list-wrap row justify-content-center'>
258271
<li className='social-icons col'>
@@ -293,7 +306,7 @@ const Header = () => {
293306
</ul>
294307
</div>
295308
</div>
296-
<div className='row'>
309+
{/* <div className='row'>
297310
<span className='mt-2 left-menu-footer mb-10'>
298311
{' '}
299312
<Link to={'/about'} onClick={handleMenuToggleCloseClick}>
@@ -303,7 +316,7 @@ const Header = () => {
303316
Privacy Policy
304317
</Link>
305318
</span>
306-
</div>
319+
</div> */}
307320
</nav>
308321
</div>
309322
)}

0 commit comments

Comments
 (0)