File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
apps/web/@/molecules/posts/post-item Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import Image from "next/image"
22import Link from "next/link"
33
44import { TPostItem } from "database"
5+ import { useTranslations } from "next-intl"
56import { Typography } from "ui"
67
78import APP_ROUTES from "@/constants/routes"
@@ -14,6 +15,8 @@ import LikeButton from "./like-button"
1415import PostMeta from "./post-meta"
1516
1617export default function PostItem ( { post } : { post : TPostItem } ) {
18+ const t = useTranslations ( "common" )
19+
1720 return (
1821 < div className = "mb-4 flex rounded-sm border px-8 py-4" >
1922 < div className = "flex-1" >
@@ -26,7 +29,7 @@ export default function PostItem({ post }: { post: TPostItem }) {
2629 variant = "h2"
2730 className = "hover:underline"
2831 >
29- { post . title }
32+ { post . title || t ( "untitled" ) }
3033 </ Typography >
3134 </ Link >
3235
You can’t perform that action at this time.
0 commit comments