--- import type { SquidexEditable, Multilingual } from './SharedProperties.js'; import type { Brand } from "../data/models/multis/Brand"; import { getAssetById, getLocaleField } from "../data/api-client"; import path from "node:path"; import { renderMarkdown } from "../lib/rendering"; interface Props extends Multilingual, SquidexEditable { brand: Brand, } const { brand, editToken, locale } = Astro.props; let brandLogoImage = path.posix.join('/img', (await getAssetById(brand.logoImage![locale])) .links['content'] .href .split('/') .reverse() .filter((_value, index, array) => index < (array.length - index - 2)) .reverse() .join('/')); ---
{ brandLogoImage && {brand.brandName[locale]} }
{getLocaleField(locale, brand.shortDescription!) &&
}
{getLocaleField(locale, brand.longDescription!) &&
}