Код: Выделить всё
const useIndicativeImageSheetContent = (
contentType = 'IndicativeVehicleImageText',
) => {
const { data } = useStaticContent(contentType);
< /code>
Однако я получаю ошибку: < /p>
аргумент типа 'строки' не назначается параметрам типа 'keyof staticContentData'.export type StaticContentData = {
....
IndicativeVehicleImageText: MobileApiContract.Models.CMSEnrichmentModels.IndicativeVehicleImageText;
vehicleValuation: MobileApiContract.Models.CMSEnrichmentModels.VehicleValuationBottomSheet;
AutoUpdateBottomSheet: MobileApiContract.Models.CMSEnrichmentModels.AutoUpdateBottomSheet;
};
export type KnownStaticContentKeys = keyof StaticContentData;
Подробнее здесь: https://stackoverflow.com/questions/796 ... ontentdata