--- import type { Brand } from "../data/models/multis/Brand"; import { getAssetById } from "../data/api-client"; import path from "node:path"; import type { Multilingual, SquidexEditable } from "./SharedProperties"; 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 //The purpose of .split('/').reverse().filter(...2...).reverse().join('/') is to //extract the last two directories from the end of the path, which we will //use to form the path to the ../pages/img/[...imageLookup].astro handler, e.g., //in the form of `/img/${uuid}/${fileName}.${ext}`. .split('/') .reverse() .filter((_value, index, array) => index < (array.length - index - 2)) .reverse() .join('/')); ---
  • {brand.brandName[locale]}