feat(cards): adjusting for backend data types

This commit is contained in:
2025-03-31 17:49:17 +00:00
parent c817654f3e
commit c609b45d99
4 changed files with 43 additions and 32 deletions

View File

@@ -82,9 +82,9 @@ const eventDataType = object({
const dataTypeValidator = variant("type", [locationDataType, eventDataType]);
const getUserImagesResponseValidator = array(dataTypeValidator);
export const getUserImages = async (): Promise<
InferOutput<typeof getUserImagesResponseValidator>
> => {
export type UserImage = InferOutput<typeof dataTypeValidator>;
export const getUserImages = async (): Promise<UserImage[]> => {
const request = getBaseRequest({ path: "image" });
const res = await fetch(request).then((res) => res.json());