Skip to content

Commit

Permalink
disallow news displaying empty
Browse files Browse the repository at this point in the history
  • Loading branch information
anamontiaga committed Jan 19, 2024
1 parent 7db2997 commit f0457fd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/containers/navigation/news/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { activeGuideAtom } from 'store/guide';

import { useRecoilValue } from 'recoil';

import { useBlogPosts } from 'hooks/blog';

import Helper from 'containers/guide/helper';
import BlogContent from 'containers/news/content';

Expand All @@ -12,6 +14,7 @@ import NEWS_SVG from 'svgs/tools-bar/news.svg?sprite';

const News = () => {
const guideIsActive = useRecoilValue(activeGuideAtom);
const { data } = useBlogPosts();

return (
<Dialog>
Expand All @@ -34,7 +37,7 @@ const News = () => {
</div>
</DialogTrigger>

{!guideIsActive && (
{!guideIsActive && data && (
<DialogContent className="md:mb-20">
<BlogContent />
</DialogContent>
Expand Down

0 comments on commit f0457fd

Please sign in to comment.