revert fb8e77bb68
Local Build and Deploy / deploy (push) Successful in 1m11s

revert style: clean up code with prettier and eslint
This commit is contained in:
remco committed 2026-07-12 21:02:03 +02:00
1 parent 27de078f54
commit e85e4d74ea
378 files changed
+20710 -22428

No files matched your search

+16 -9
View File
@@ -5,11 +5,11 @@
* Override with NEXT_PUBLIC_IMAGER_URL when needed (e.g. CDN in front).
*/
const IMAGER_URL = process.env.NEXT_PUBLIC_IMAGER_URL || "/api/imaging/avatar";
const IMAGER_URL = process.env.NEXT_PUBLIC_IMAGER_URL || '/api/imaging/avatar'
export type { AvatarOptions } from "@/types/admin";
export type { AvatarOptions } from '@/types/admin'
import type { AvatarOptions } from "@/types/admin";
import type { AvatarOptions } from '@/types/admin'
/**
* Build an avatar image URL served by the self-hosted imager.
@@ -20,18 +20,25 @@ import type { AvatarOptions } from "@/types/admin";
* getAvatarUrl(look, { size: 'm', gesture: 'sml', direction: 2 })
*/
export function getAvatarUrl(figure: string, options: AvatarOptions = {}): string {
const { size = "m", direction = 2, headDirection = 3, headOnly = false, gesture, action } = options;
const {
size = 'm',
direction = 2,
headDirection = 3,
headOnly = false,
gesture,
action,
} = options
const params = new URLSearchParams({
figure,
direction: String(direction),
head_direction: String(headDirection),
size,
});
})
if (headOnly) params.set("headonly", "1");
if (gesture) params.set("gesture", gesture);
if (action) params.set("action", action);
if (headOnly) params.set('headonly', '1')
if (gesture) params.set('gesture', gesture)
if (action) params.set('action', action)
return `${IMAGER_URL}?${params.toString()}`;
return `${IMAGER_URL}?${params.toString()}`
}