-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: recent question asked for example on mainpage
- Loading branch information
Showing
10 changed files
with
86 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,32 @@ | ||
import { api } from "@/trpc/server"; | ||
import { getTranslations } from "next-intl/server"; | ||
|
||
import { Card, CardContent } from "@tanya.in/ui/card"; | ||
|
||
import { ChatCard } from "./card"; | ||
|
||
export default function HomePage() { | ||
export default async function HomePage() { | ||
const t = await getTranslations("Home"); | ||
const recent = await api.chat.getRecentQuestion(); | ||
|
||
return ( | ||
<div className="container flex-1 self-center md:-translate-x-6"> | ||
<ChatCard /> | ||
<ChatCard className="peer" /> | ||
<Card className="m-2 mx-auto max-w-[26rem] -translate-y-2 rounded-t-none bg-default-100 p-2 transition-transform delay-300 ease-in-out peer-has-[[data-started=true]]:-translate-y-24"> | ||
<p className="p-1 text-xs font-bold text-foreground/40"> | ||
{t("examples")} | ||
</p> | ||
|
||
<div className="flex flex-row gap-1"> | ||
{recent.map((chat) => ( | ||
<Card className="bg-card shadow-none" key={chat.id}> | ||
<CardContent className="line-clamp-2 rounded-md p-2 text-sm"> | ||
{chat.content} | ||
</CardContent> | ||
</Card> | ||
))} | ||
</div> | ||
</Card> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters