revert shitty layout, use cdn for vendors (new ones coming soon)

This commit is contained in:
Will Freeman
2026-01-16 23:42:14 -07:00
parent 67eae25a1a
commit 73269f45b0
39 changed files with 294 additions and 375 deletions
+20
View File
@@ -0,0 +1,20 @@
import { defineStore } from 'pinia';
import { ref } from 'vue';
import { cmsService } from '@/services/cmsService';
import type { LprVendor } from '@/types';
export const useVendorStore = defineStore('vendorStore', () => {
const lprVendors = ref<LprVendor[]>([]);
async function loadAllVendors(): Promise<void> {
if (lprVendors.value.length > 0) return;
lprVendors.value = await cmsService.getLprVendors();
}
async function getFirstImageForManufacturer(fullName: string): Promise<string | null> {
const vendor = lprVendors.value.find(v => v.fullName === fullName);
return vendor?.urls?.[0]?.url ?? null;
}
return { lprVendors, loadAllVendors, getFirstImageForManufacturer };
});