mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-06-02 21:24:20 -04:00
Fix build errors
This commit is contained in:
parent
eb92eed532
commit
ae095b3e2c
@ -41,19 +41,21 @@ type IconProps = {
|
|||||||
|
|
||||||
export const Icon = ({ icon: Icon, color, size = 24, ...props }: IconProps) => {
|
export const Icon = ({ icon: Icon, color, size = 24, ...props }: IconProps) => {
|
||||||
const { css, theme } = useYoshiki();
|
const { css, theme } = useYoshiki();
|
||||||
// eslint-disable-next-line react-hooks/rules-of-hooks
|
const computed = css(
|
||||||
const colorValue = Platform.OS !== "web" ? useBreakpointValue(color) : null;
|
{ width: size, height: size, fill: color ?? theme.contrast } as ViewStyle,
|
||||||
|
props,
|
||||||
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Icon
|
<Icon
|
||||||
{...Platform.select<SvgProps>({
|
{...Platform.select<SvgProps>({
|
||||||
web: css({ width: size, height: size, fill: color ?? theme.contrast } as ViewStyle, props),
|
web: computed,
|
||||||
default: {
|
default: {
|
||||||
height: size,
|
height: computed.style?.height,
|
||||||
width: size,
|
width: computed.style?.width,
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
fill: colorValue ?? theme.contrast,
|
fill: computed.style?.fill,
|
||||||
...props,
|
...computed,
|
||||||
},
|
},
|
||||||
})}
|
})}
|
||||||
/>
|
/>
|
||||||
|
@ -156,6 +156,7 @@ const TitleLine = ({
|
|||||||
</Skeleton>
|
</Skeleton>
|
||||||
)}
|
)}
|
||||||
<View {...css({ flexDirection: "row" })}>
|
<View {...css({ flexDirection: "row" })}>
|
||||||
|
{/* @ts-ignore */}
|
||||||
<IconFab
|
<IconFab
|
||||||
icon={PlayArrow}
|
icon={PlayArrow}
|
||||||
as={Link}
|
as={Link}
|
||||||
|
@ -116,7 +116,7 @@ export const Player: QueryPage<{ slug: string }> = ({ slug }) => {
|
|||||||
if (error || playbackError)
|
if (error || playbackError)
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Back isLoading={false} {...css({ position: "relative", bg: (theme) => theme.appbar })} />
|
<Back isLoading={false} {...css({ position: "relative", bg: (theme) => theme.accent })} />
|
||||||
<ErrorView error={error ?? { errors: [playbackError!] }} />
|
<ErrorView error={error ?? { errors: [playbackError!] }} />
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user