fix: resolve TypeScript and lint issues
CI / check (push) Successful in 26s
CI / release (push) Skipped
CI / deploy (push) Successful in 58s

- Fix proxy routes to use resolveImagerBase instead of removed resolveUpstreamBase
- Fix avatarImageUrl type signature to use AvatarOptions
- Run biome formatter
This commit is contained in:
openhands committed 2026-08-09 19:42:02 +02:00
1 parent fc7e6ca248
commit 7a2c0fd4d4
19 files changed
+86 -164

No files matched your search

+4 -9
View File
@@ -26,7 +26,6 @@ import {
} from "@/lib/db";
import { avatarImageUrl } from "@/lib/format";
import { formatDate } from "@/lib/format-date";
import { siteSettings } from "@/lib/services/site-settings";
type SearchParams = Promise<{
friend?: string;
@@ -87,7 +86,7 @@ export default async function ProfilePage({
const { username } = await params;
const { friend, guestbook: guestbookStatus, error } = await searchParams;
const [userRows, imagerBase, session] = await Promise.all([
const [userRows, session] = await Promise.all([
db
.select({
id: User.id,
@@ -102,17 +101,13 @@ export default async function ProfilePage({
.from(User)
.where(eq(User.username, username))
.limit(1),
siteSettings.get(
"habbo_imaging_url",
"https://www.habbo.com/habbo-imaging/avatarimage",
),
auth(),
]);
const user = userRows[0] ?? null;
if (!user) notFound();
const avatar = avatarImageUrl(imagerBase ?? "", user.look, { size: "l" });
const avatar = avatarImageUrl(user.look, { size: "l" });
const registered = formatDate(new Date(user.accountCreated * 1000), "date");
const meId = Number(session?.user?.id);
const isLoggedIn = Number.isInteger(meId) && meId > 0;
@@ -484,7 +479,7 @@ export default async function ProfilePage({
>
{/* eslint-disable-next-line @next/next/no-img-element */}
<img
src={avatarImageUrl(imagerBase ?? "", f.look, {
src={avatarImageUrl(f.look, {
size: "m",
headOnly: true,
})}
@@ -686,7 +681,7 @@ export default async function ProfilePage({
{guestbook.map((g) => {
const author = authorById.get(g.userId);
const authorAvatar = author
? avatarImageUrl(imagerBase ?? "", author.look, {
? avatarImageUrl(author.look, {
size: "s",
headOnly: true,
})