Skip to content

Commit

Permalink
article page error state
Browse files Browse the repository at this point in the history
  • Loading branch information
Ion-Stefan committed Mar 2, 2024
1 parent cbdfe00 commit 39313d2
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/pages/Articles.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ const Articles = () => {
<div>
<ArticleBar />
<div>
<div>
<div className="lg: min-h-[725px]">
{articles.length === 0 ? <NoArticles/> : null}
{articles?.map((article) => (
<DisplayArticle key={article._id} article={article} />
))}
Expand All @@ -69,4 +70,12 @@ const Articles = () => {
);
};

const NoArticles = () => {
return (
<div className="flex items-center justify-center absolute top-[50%] left-[10%] lg:left-[25%]">
<p className="text-3xl">Nu exista articole cu aceasta categorie</p>
</div>
)
}

export default Articles;

0 comments on commit 39313d2

Please sign in to comment.