mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-24 02:02:36 -04:00
Format code
This commit is contained in:
parent
f3fb96504a
commit
bb14d9944a
@ -23,8 +23,8 @@ import { type ComponentType, type RefAttributes, forwardRef } from "react";
|
||||
import { Image, type ImageProps, View, type ViewStyle } from "react-native";
|
||||
import { type Stylable, px, useYoshiki } from "yoshiki/native";
|
||||
import { Icon } from "./icons";
|
||||
import { P } from "./text";
|
||||
import { Skeleton } from "./skeleton";
|
||||
import { P } from "./text";
|
||||
|
||||
const stringToColor = (string: string) => {
|
||||
let hash = 0;
|
||||
@ -124,4 +124,4 @@ const AvatarLoader = ({ size = px(24), ...props }: { size?: number }) => {
|
||||
);
|
||||
};
|
||||
|
||||
export const Avatar = { ...AvatarC, Loader: AvatarLoader };
|
||||
export const Avatar = Object.assign(AvatarC, { Loader: AvatarLoader });
|
||||
|
@ -18,7 +18,7 @@
|
||||
* along with Kyoo. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import { View, type TextProps } from "react-native";
|
||||
import { type TextProps, View } from "react-native";
|
||||
import { type Theme, px, rem, useYoshiki } from "yoshiki/native";
|
||||
import { Link } from "./links";
|
||||
import { Skeleton } from "./skeleton";
|
||||
|
@ -19,7 +19,7 @@
|
||||
*/
|
||||
|
||||
import { getCurrentToken } from "@kyoo/models";
|
||||
import { ReactElement, useState } from "react";
|
||||
import { type ReactElement, useState } from "react";
|
||||
import { type FlexStyle, type ImageStyle, View, type ViewStyle } from "react-native";
|
||||
import { Blurhash } from "react-native-blurhash";
|
||||
import FastImage from "react-native-fast-image";
|
||||
|
@ -19,7 +19,7 @@
|
||||
*/
|
||||
|
||||
import NextImage from "next/image";
|
||||
import { ReactElement, useState } from "react";
|
||||
import { type ReactElement, useState } from "react";
|
||||
import { type ImageStyle, View, type ViewStyle } from "react-native";
|
||||
import { useYoshiki } from "yoshiki/native";
|
||||
import { imageBorderRadius } from "../constants";
|
||||
@ -74,7 +74,7 @@ export const Image = ({
|
||||
);
|
||||
};
|
||||
|
||||
Image.Loader = ({ layout, ...props }: { layout: ImageLayout, children?: ReactElement }) => {
|
||||
Image.Loader = ({ layout, ...props }: { layout: ImageLayout; children?: ReactElement }) => {
|
||||
const { css } = useYoshiki();
|
||||
const border = { borderRadius: 6, overflow: "hidden" } satisfies ViewStyle;
|
||||
|
||||
|
@ -43,7 +43,7 @@ Poster.Loader = ({
|
||||
layout,
|
||||
...props
|
||||
}: {
|
||||
children?: ReactElement;
|
||||
children?: ReactElement;
|
||||
layout: YoshikiEnhanced<{ width: ImageStyle["width"] } | { height: ImageStyle["height"] }>;
|
||||
}) => <Image.Loader layout={{ aspectRatio: 2 / 3, ...layout }} {...props} />;
|
||||
|
||||
|
@ -33,11 +33,11 @@ import {
|
||||
} from "@kyoo/primitives";
|
||||
import { useState } from "react";
|
||||
import { Platform, View } from "react-native";
|
||||
import type { Stylable } from "yoshiki";
|
||||
import { percent, px, rem, useYoshiki } from "yoshiki/native";
|
||||
import { ItemContext } from "../components/context-menus";
|
||||
import type { Layout } from "../fetch";
|
||||
import { ItemWatchStatus } from "./grid";
|
||||
import type { Stylable } from "yoshiki";
|
||||
|
||||
export const ItemList = ({
|
||||
href,
|
||||
|
@ -22,6 +22,7 @@ import { type KyooImage, WatchStatusV } from "@kyoo/models";
|
||||
import {
|
||||
H6,
|
||||
IconButton,
|
||||
Image,
|
||||
ImageBackground,
|
||||
type ImageProps,
|
||||
Link,
|
||||
@ -32,7 +33,6 @@ import {
|
||||
important,
|
||||
tooltip,
|
||||
ts,
|
||||
Image,
|
||||
} from "@kyoo/primitives";
|
||||
import ExpandMore from "@material-symbols/svg-400/rounded/keyboard_arrow_down-fill.svg";
|
||||
import ExpandLess from "@material-symbols/svg-400/rounded/keyboard_arrow_up-fill.svg";
|
||||
|
Loading…
x
Reference in New Issue
Block a user