Fixes: None; Extra: 1) Create Pinia stores for app, user, category, and company management; 2) Add utility functions for error handling and category slug lookups; 3) Include German locale file and robots.txt for improved SEO and accessibility; 4) Add SVG assets and improve general folder structure for better maintainability.
21 lines
No EOL
481 B
TypeScript
21 lines
No EOL
481 B
TypeScript
import {GET_BRAND_BY_UUID} from "~/graphql/queries/standalone/brands";
|
|
import type {IBrandsResponse} from "~/types";
|
|
|
|
export async function useBrandByUuid(uuid: string) {
|
|
const brand = computed(() => data.value?.brands.edges[0].node ?? []);
|
|
|
|
const { data, error } = await useAsyncQuery<IBrandsResponse>(
|
|
GET_BRAND_BY_UUID,
|
|
{ uuid }
|
|
);
|
|
|
|
watch(error, (err) => {
|
|
if (err) {
|
|
console.error('useBrandsByUuid error:', err)
|
|
}
|
|
});
|
|
|
|
return {
|
|
brand
|
|
}
|
|
} |