Skip to content

Commit

Permalink
🌱 fix: update the blog post home
Browse files Browse the repository at this point in the history
  • Loading branch information
nyomansunima committed May 17, 2023
1 parent 5719a64 commit 5c99991
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
13 changes: 5 additions & 8 deletions apps/frontend/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { OutlineButton } from '@components/buttons'
import commonService from '@lib/services/common-service'
import { useRouter } from 'next/router'
import { ContactSection } from '@components/contact'
import Link from 'next/link'

const getServerSideProps: GetServerSideProps = async () => {
const queryClient = new QueryClient()
Expand Down Expand Up @@ -411,28 +412,24 @@ const HomePage: NextPageWithLayout = (): JSX.Element => {
<div className={styles.content}>
<div className={`${styles.slide} slide`}>
{detailQuery.data.blogPosts.map((post, index) => (
<div
<Link
href={`/blog/${post.slug}`}
key={index}
className={styles.item}
onClick={() =>
openLink(
`${process.env.NEXT_PUBLIC_HASHNODE_BLOG_URL}/${post.slug}`
)
}
>
<picture
data-cursor-size="80"
data-cursor-icon="fi fi-rr-arrow-up-right"
>
<Image
src={post.coverImage}
src={post.thumbnail}
fill
alt={post.title}
sizes="auto"
/>
</picture>
<h4>{post.title}</h4>
</div>
</Link>
))}
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions apps/frontend/types/home.d.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { ArticlePost, Exploration } from './content'
import { ArticlePost, BlogPostItem, Exploration } from './content'
import { Inspiration } from './inspiration'

export interface HomeDetail {
inspirations: Inspiration[]
blogPosts: ArticlePost[]
blogPosts: BlogPostItem[]
explorations: Exploration[]
stories: {
accentColor: string
Expand Down

2 comments on commit 5c99991

@vercel
Copy link

@vercel vercel bot commented on 5c99991 May 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on 5c99991 May 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.