mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-24 02:02:36 -04:00
Update biome
This commit is contained in:
parent
c7d70e1eec
commit
c78e2ed9e8
@ -191,7 +191,7 @@ export const AccountProvider = ({
|
||||
<AccountContext.Provider value={accounts}>
|
||||
<ConnectionErrorContext.Provider
|
||||
value={{
|
||||
error: (selected ? initialSsrError.current ?? userError : null) ?? permissionError,
|
||||
error: (selected ? (initialSsrError.current ?? userError) : null) ?? permissionError,
|
||||
loading: userIsLoading,
|
||||
retry: () => {
|
||||
queryClient.invalidateQueries({ queryKey: ["auth", "me"] });
|
||||
|
@ -56,7 +56,7 @@ const MediaTypeTrigger = forwardRef<View, PressableProps & { mediaType: MediaTyp
|
||||
const { t } = useTranslation();
|
||||
const labelKey =
|
||||
mediaType !== MediaTypeAll ? `browse.mediatypekey.${mediaType.key}` : "browse.mediatypelabel";
|
||||
const icon = mediaType !== MediaTypeAll ? mediaType?.icon ?? FilterList : FilterList;
|
||||
const icon = mediaType !== MediaTypeAll ? (mediaType?.icon ?? FilterList) : FilterList;
|
||||
return (
|
||||
<PressableFeedback
|
||||
ref={ref}
|
||||
|
@ -53,11 +53,11 @@ export const itemMap = (
|
||||
href: item.href,
|
||||
poster: item.poster,
|
||||
thumbnail: item.thumbnail,
|
||||
watchStatus: item.kind !== "collection" ? item.watchStatus?.status ?? null : null,
|
||||
watchStatus: item.kind !== "collection" ? (item.watchStatus?.status ?? null) : null,
|
||||
type: item.kind,
|
||||
watchPercent: item.kind !== "collection" ? item.watchStatus?.watchedPercent ?? null : null,
|
||||
watchPercent: item.kind !== "collection" ? (item.watchStatus?.watchedPercent ?? null) : null,
|
||||
unseenEpisodesCount:
|
||||
item.kind === "show" ? item.watchStatus?.unseenEpisodesCount ?? item.episodesCount! : null,
|
||||
item.kind === "show" ? (item.watchStatus?.unseenEpisodesCount ?? item.episodesCount!) : null,
|
||||
});
|
||||
|
||||
export const createFilterString = (mediaType: MediaType): string | undefined => {
|
||||
|
@ -178,7 +178,7 @@ export const CollectionPage: QueryPage<{ slug: string }> = ({ slug }) => {
|
||||
watchStatus={(item.kind !== "collection" && item.watchStatus?.status) || null}
|
||||
unseenEpisodesCount={
|
||||
item.kind === "show"
|
||||
? item.watchStatus?.unseenEpisodesCount ?? item.episodesCount!
|
||||
? (item.watchStatus?.unseenEpisodesCount ?? item.episodesCount!)
|
||||
: null
|
||||
}
|
||||
{...css({ marginX: ItemGrid.layout.gap })}
|
||||
|
@ -307,7 +307,7 @@ export const Recommended = () => {
|
||||
watchStatus={(item.kind !== "collection" && item.watchStatus?.status) || null}
|
||||
unseenEpisodesCount={
|
||||
item.kind === "show"
|
||||
? item.watchStatus?.unseenEpisodesCount ?? item.episodesCount!
|
||||
? (item.watchStatus?.unseenEpisodesCount ?? item.episodesCount!)
|
||||
: null
|
||||
}
|
||||
/>
|
||||
|
@ -92,7 +92,8 @@ export const Player = ({
|
||||
const [playbackError, setPlaybackError] = useState<string | undefined>(undefined);
|
||||
const { data, error } = useFetch(Player.query(type, slug));
|
||||
const { data: info, error: infoError } = useFetch(Player.infoQuery(type, slug));
|
||||
const image = data && data.type === "episode" ? data.show?.poster ?? data?.poster : data?.poster;
|
||||
const image =
|
||||
data && data.type === "episode" ? (data.show?.poster ?? data?.poster) : data?.poster;
|
||||
const previous =
|
||||
data && data.type === "episode" && data.previousEpisode
|
||||
? `/watch/${data.previousEpisode.slug}?t=0`
|
||||
|
@ -147,7 +147,7 @@ export const AudiosMenu = ({ audios, ...props }: CustomMenu & { audios?: Audio[]
|
||||
{info.audioTracks.map((x) => (
|
||||
<Menu.Item
|
||||
key={x.index}
|
||||
label={audios ? getDisplayName(audios[x.index]) : x.title ?? x.language ?? "Unknown"}
|
||||
label={audios ? getDisplayName(audios[x.index]) : (x.title ?? x.language ?? "Unknown")}
|
||||
selected={audio!.index === x.index}
|
||||
onSelect={() => setAudio(x as any)}
|
||||
/>
|
||||
|
@ -71,7 +71,7 @@ export const GeneralSettings = () => {
|
||||
onValueChange={(value) => changeLanguage(value)}
|
||||
values={["system", ...Object.keys(i18n.options.resources!)]}
|
||||
getLabel={(key) =>
|
||||
key === "system" ? t("settings.general.language.system") : getLanguageName(key) ?? key
|
||||
key === "system" ? t("settings.general.language.system") : (getLanguageName(key) ?? key)
|
||||
}
|
||||
/>
|
||||
</Preference>
|
||||
|
@ -64,7 +64,7 @@ export const PlaybackSettings = () => {
|
||||
onValueChange={(value) => setAudio(value)}
|
||||
values={["default", ...allLanguages]}
|
||||
getLabel={(key) =>
|
||||
key === "default" ? t("mediainfo.default") : getLanguageName(key) ?? key
|
||||
key === "default" ? t("mediainfo.default") : (getLanguageName(key) ?? key)
|
||||
}
|
||||
/>
|
||||
</Preference>
|
||||
@ -83,7 +83,7 @@ export const PlaybackSettings = () => {
|
||||
? t("settings.playback.subtitleLanguage.none")
|
||||
: key === "default"
|
||||
? t("mediainfo.default")
|
||||
: getLanguageName(key) ?? key
|
||||
: (getLanguageName(key) ?? key)
|
||||
}
|
||||
/>
|
||||
</Preference>
|
||||
|
Loading…
x
Reference in New Issue
Block a user