feat: добавить рабочий dashboard admin

- добавлен Mantine theme provider и AppShell layout\n- сгенерирован Backend API клиент и добавлены infra/business хуки\n- добавлены таблица assets, detail/presets panels и create asset modal
This commit is contained in:
2026-05-05 15:02:55 +03:00
parent 72f9386f57
commit 6a018826f5
50 changed files with 2870 additions and 120 deletions

View File

@@ -0,0 +1,21 @@
import { useGetAsset, useGetAssetVariants } from "infra/backend-api"
import type { AssetOverview } from "../types/assets-api.type"
/**
* Данные выбранного asset и его variants.
*/
export const useAssetOverview = (publicId: string | null): AssetOverview => {
const assetQuery = useGetAsset(publicId)
const variantsQuery = useGetAssetVariants(
publicId,
assetQuery.data?.currentVersion ? String(assetQuery.data.currentVersion) : undefined,
)
return {
asset: assetQuery.data ?? null,
error: assetQuery.error ?? variantsQuery.error,
isLoading: assetQuery.isLoading || variantsQuery.isLoading,
variants: variantsQuery.data?.variants ?? [],
}
}