diff --git a/src/app/(site)/login/page.tsx b/src/app/(site)/login/page.tsx index cd7c44e7..8eb00192 100644 --- a/src/app/(site)/login/page.tsx +++ b/src/app/(site)/login/page.tsx @@ -24,7 +24,7 @@ export default async function LoginPage() { const imager = imagerRaw ?? "https://www.habbo.com/habbo-imaging/avatarimage"; const nonce = (await headers()).get("x-nonce") ?? undefined; - const [online, recentUsers] = await Promise.all([ + const [online, recentUsers, latestUsers] = await Promise.all([ cached("online_count", 10_000, () => prisma.user.count({ where: { online: "1" } }), ).catch(() => 0), @@ -35,6 +35,13 @@ export default async function LoginPage() { take: 8, }) .catch(() => []), + prisma.user + .findMany({ + orderBy: { accountCreated: "desc" }, + select: { username: true, look: true }, + take: 8, + }) + .catch(() => []), ]); return ( @@ -139,6 +146,51 @@ export default async function LoginPage() { )} + {latestUsers.length > 0 && ( +
{t("noAccount") ?? "No account?"}{" "} prisma.user.count({ where: { online: "1" } }), @@ -42,6 +42,13 @@ async function getHotelData() { prisma.cameraWeb .findMany({ orderBy: { timestamp: "desc" }, take: 4 }) .catch(() => []), + prisma.user + .findMany({ + orderBy: { accountCreated: "desc" }, + select: { username: true, look: true }, + take: 8, + }) + .catch(() => []), ]); return { @@ -53,6 +60,7 @@ async function getHotelData() { articles, recentUsers, recentPhotos, + latestUsers, }; } @@ -71,6 +79,7 @@ export default async function Home() { articles, recentUsers, recentPhotos, + latestUsers, } = await getHotelData(); return ( @@ -230,7 +239,45 @@ export default async function Home() { ))} - {/* ── 4. News ── */} + {/* ── 4. Newest citizens ── */} + {latestUsers.length > 0 && ( +