diff --git a/landing/app-landing.react.js b/landing/app-landing.react.js --- a/landing/app-landing.react.js +++ b/landing/app-landing.react.js @@ -2,15 +2,15 @@ import * as React from 'react'; -import { assetMetaData } from './asset-meta-data.js'; +import { imageAssetMetaData } from './asset-meta-data.js'; import HeroContent from './hero-content.react.js'; import css from './landing.css'; import Picture from './Picture.react.js'; -import usePreloadAssets from './use-pre-load-assets.react.js'; +import usePreloadImageAssets from './use-pre-load-image-assets.react.js'; function AppLanding(): React.Node { - usePreloadAssets(assetMetaData); - const [hero] = assetMetaData; + usePreloadImageAssets(imageAssetMetaData); + const [hero] = imageAssetMetaData; return (
diff --git a/landing/asset-meta-data.js b/landing/asset-meta-data.js --- a/landing/asset-meta-data.js +++ b/landing/asset-meta-data.js @@ -2,7 +2,7 @@ import css from './landing.css'; -export type Asset = { +export type ImageAsset = { +alt: string, +url: string, +title: string, @@ -12,7 +12,7 @@ }; export const assetsCacheURLPrefix = 'https://dh9fld3hutpxf.cloudfront.net'; -export const assetMetaData = [ +export const imageAssetMetaData = [ { alt: 'a mobile phone screen highlighting chat and DAO voting', url: `${assetsCacheURLPrefix}/Header`, diff --git a/landing/hero-content.react.js b/landing/hero-content.react.js --- a/landing/hero-content.react.js +++ b/landing/hero-content.react.js @@ -3,13 +3,13 @@ import classNames from 'classnames'; import * as React from 'react'; -import { assetMetaData } from './asset-meta-data.js'; +import { imageAssetMetaData } from './asset-meta-data.js'; import css from './hero-content.css'; import SubscriptionForm from './subscription-form.react.js'; import typography from './typography.css'; function HeroContent(): React.Node { - const [hero] = assetMetaData; + const [hero] = imageAssetMetaData; const headerClassName = classNames([typography.display3, css.header]); const subheaderClassName = classNames([ diff --git a/landing/use-pre-load-assets.react.js b/landing/use-pre-load-image-assets.react.js rename from landing/use-pre-load-assets.react.js rename to landing/use-pre-load-image-assets.react.js --- a/landing/use-pre-load-assets.react.js +++ b/landing/use-pre-load-image-assets.react.js @@ -2,9 +2,9 @@ import * as React from 'react'; -import { type Asset } from './asset-meta-data.js'; +import { type ImageAsset } from './asset-meta-data.js'; -function usePreloadAssets(assets: Asset[]) { +function usePreloadImageAssets(assets: ImageAsset[]) { React.useEffect(() => { const testWEBP = 'UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA'; const testImg = new Image(); @@ -29,4 +29,4 @@ }, [assets]); } -export default usePreloadAssets; +export default usePreloadImageAssets;