refactor(backend): better code quality, fix timeout issue, fix website eat port 3000, fix nginx wrong point, better docker compose file, moving some file and change some import, update package dependency etc.

This commit is contained in:
2026-07-06 21:44:30 +07:00 Unverified
parent 6a4f06f5aa
commit 05cf38d020
11 changed files with 238 additions and 198 deletions
+6 -3
View File
@@ -1,4 +1,4 @@
import { config } from "@/lib/config";
import { config, config_p2 } from "@/lib/config";
import { Card, CardHeader } from "@/components/ui/card";
import Image from "next/image";
import { getFollowerCounts } from "@/lib/followers";
@@ -10,6 +10,7 @@ import { Kbd } from "@/components/ui/kbd";
export default async function Home() {
const { counts, tiktokProfile } = await getFollowerCounts();
const headersList = await headers();
const ip = headersList.get("x-forwarded-for") || headersList.get("x-real-ip") || "unknown";
@@ -28,6 +29,8 @@ export default async function Home() {
const profileName = tiktokProfile.displayName || config.profile.name;
const profileAvatar = tiktokProfile.avatarUrl || config.profile.avatar;
const links1 = [...config.links];
const jsonLd = {
"@context": "https://schema.org",
"@type": "ProfilePage",
@@ -38,7 +41,7 @@ export default async function Home() {
"@type": "Person",
name: profileName,
image: profileAvatar.startsWith("/") ? `https://erika.sudloh.com${profileAvatar}` : profileAvatar,
sameAs: config.links.map((l) => l.link),
sameAs: links1.map((l) => l.link),
},
};
@@ -82,7 +85,7 @@ export default async function Home() {
</div>
</CardHeader>
<LinkCard counts={counts} />
<LinkCard counts={counts} links1={links1} links2={config_p2.links} />
</Card>
</main>
);