Skip to content

Commit

Permalink
resolve error
Browse files Browse the repository at this point in the history
  • Loading branch information
dhruv8433 committed Jul 3, 2024
1 parent 8c0372c commit f484879
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 1 addition & 5 deletions app/components/HorizontalCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,6 @@ const HorizontalCard = ({ data, profilePage }) => {
<div>
{data.slice(0, 5).map((article) => {
// to display ... after certain characters
const truncatedBody =
article.body.length > 300
? `${article.lead_paragraph.substring(0, 300)}...`
: article.body;
return (
<>
{/* if it doesn't a profile page than only this add fav btn visible */}
Expand Down Expand Up @@ -103,7 +99,7 @@ const HorizontalCard = ({ data, profilePage }) => {
{article.abstract}
</h1>
<h1 className="hover:text-red-300 text-sm">
{truncatedBody}
{article.lead_paragraph}
</h1>
<h1 className="hover:text-red-400 text-sm">
Date: {article.pub_date}
Expand Down
2 changes: 1 addition & 1 deletion app/page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default function Home() {
<Swiper />
<ListCategoryContainer />
<PopularNews />
{/* <BusinessCareer /> */}
<BusinessCareer />
</div>
);
}

0 comments on commit f484879

Please sign in to comment.