Skip to content

Commit f2a7038

Browse files
committed
feat: refactor home page
1 parent 92e7fe5 commit f2a7038

File tree

7 files changed

+17
-20
lines changed

7 files changed

+17
-20
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<p align="center">
22
<a href="https://codeforstartup.com/">
33
<img src="./images/home-screen.png">
4-
<h1 align="center" style="color: red">TOPLIST</h1>
4+
<h1 align="center" style="color: red">NEXT FORUM</h1>
55
</a>
66
</p>
77

8-
# About TOPLIST
8+
# About next-forum
99

1010
# Installation
1111

apps/admin/@/molecules/nav/logo.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const Logo: React.FC = () => {
1616
bebasNeue.className
1717
)}
1818
>
19-
TOPLIST
19+
NEXT-FORUM
2020
</h1>
2121
</Link>
2222
)

apps/web/@/molecules/nav/logo.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const Logo: React.FC = () => {
1616
bebasNeue.className
1717
)}
1818
>
19-
TOPLIST
19+
NEXT-FORUM
2020
</h1>
2121
</Link>
2222
)

apps/web/@/molecules/post-list/index.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ import useInfiniteScroll from "@/hooks/useInfinityScroll"
99

1010
import PostItem from "../posts/post-item"
1111

12-
export default function PostList() {
12+
interface PostListProps {
13+
containerClassName?: string
14+
}
15+
16+
export default function PostList({ containerClassName }: PostListProps) {
1317
const searchParams = useSearchParams()
1418
const [page, setPage] = useState(1)
1519
const [hasMore, setHasMore] = useState(true)
@@ -31,7 +35,7 @@ export default function PostList() {
3135
const { setNode } = useInfiniteScroll(loadMoreBooks, null, loading)
3236

3337
return (
34-
<div>
38+
<div className={containerClassName}>
3539
{posts?.map((post) => (
3640
<PostItem
3741
key={post.id}
Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,18 @@
11
import { Metadata } from "next"
22

3-
import { getPosts, PostStatus } from "database"
4-
5-
import useInfiniteScroll from "@/hooks/useInfinityScroll"
63
import Filter from "@/molecules/home/filter"
74
import PostList from "@/molecules/post-list"
8-
import PostItem from "@/molecules/posts/post-item"
95

106
export const metadata: Metadata = {
11-
title: "Toplist360 - Share the best things",
7+
title: "Next-forum - Share the best things",
128
description: "Share the best things in the world",
139
}
1410

15-
export default async function Page({
16-
searchParams,
17-
}: {
18-
searchParams: { [key: string]: string | string[] | undefined }
19-
}) {
11+
export default async function Page() {
2012
return (
21-
<div className="">
13+
<div>
2214
<Filter />
23-
24-
<PostList />
15+
<PostList containerClassName="mt-4" />
2516
</div>
2617
)
2718
}

apps/web/app/[lang]/(public)/ui/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import PageTitle from "@/molecules/page-title"
77
import TagBadge from "@/molecules/tag/tag-badge"
88

99
export const metadata: Metadata = {
10-
title: "Toplist360 - Page UI",
10+
title: "Next-forum - Page UI",
1111
description: "UI components for pages",
1212
}
1313

packages/ui/@/components/ui/typography.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ const typographyVariants = cva("text-foreground", {
2727
mutedText: "text-sm text-muted-foreground p-0 m-0",
2828
span: "text-sm",
2929
strong: "font-bold",
30+
code: "code",
3031
},
3132
},
3233
defaultVariants: {
@@ -53,6 +54,7 @@ const variantElementMap: Record<NonNullable<VariantPropType["variant"]>, string>
5354
mutedText: "p",
5455
ul: "ul",
5556
span: "span",
57+
code: "code",
5658
}
5759

5860
export interface TypographyProps

0 commit comments

Comments
 (0)