diff --git a/front/apps/web/src/router.tsx b/front/apps/web/src/router.tsx index 7a8760ac..2ffe6dad 100644 --- a/front/apps/web/src/router.tsx +++ b/front/apps/web/src/router.tsx @@ -34,5 +34,10 @@ export const withRoute = ( const { ...all } = Component; Object.assign(WithUseRoute, { ...all }); + if ("getFetchUrls" in Component) { + const oldGet = Component.getFetchUrls as (obj: object) => object; + WithUseRoute.getFetchUrls = (props: object) => oldGet({ ...defaultProps, ...props }); + } + return WithUseRoute; }; diff --git a/front/packages/primitives/src/image/image.web.tsx b/front/packages/primitives/src/image/image.web.tsx index cebb2d24..8ca25916 100644 --- a/front/packages/primitives/src/image/image.web.tsx +++ b/front/packages/primitives/src/image/image.web.tsx @@ -37,7 +37,7 @@ export const Image = ({ }: Props & { style?: ImageStyle } & { layout: ImageLayout }) => { const { css } = useYoshiki(); const [state, setState] = useState<"loading" | "errored" | "finished">( - src ? (typeof window === "undefined" ? "finished" : "loading") : "errored", + typeof window === "undefined" ? "finished" : "loading", ); const border = { borderRadius: 6 } satisfies ViewStyle; diff --git a/front/packages/ui/src/player/components/hover.tsx b/front/packages/ui/src/player/components/hover.tsx index 9fe8fb79..80a9805f 100644 --- a/front/packages/ui/src/player/components/hover.tsx +++ b/front/packages/ui/src/player/components/hover.tsx @@ -105,7 +105,7 @@ export const Hover = ({ props, )} > - + { +const VideoPoster = ({ + poster, + alt, + isLoading, +}: { + poster?: KyooImage | null; + alt?: string; + isLoading: boolean; +}) => { const { css } = useYoshiki(); return ( @@ -232,6 +240,7 @@ const VideoPoster = ({ poster, alt }: { poster?: KyooImage | null; alt?: string src={poster} quality="low" alt={alt} + forcedLoading={isLoading} layout={{ width: percent(100) }} {...(css({ position: "absolute", bottom: 0 }) as { style: ImageStyle })} />