mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-07-09 03:04:20 -04:00
Format front
This commit is contained in:
parent
f438e80d3a
commit
f536713f04
@ -21,7 +21,7 @@
|
||||
import "../polyfill";
|
||||
|
||||
import { HydrationBoundary, QueryClientProvider } from "@tanstack/react-query";
|
||||
import { ReactQueryDevtools } from '@tanstack/react-query-devtools'
|
||||
import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
|
||||
import { HiddenIfNoJs, SkeletonCss, ThemeSelector } from "@kyoo/primitives";
|
||||
import { WebTooltip } from "@kyoo/primitives/src/tooltip.web";
|
||||
import {
|
||||
|
@ -36,8 +36,8 @@ const kyooUrl =
|
||||
Platform.OS !== "web"
|
||||
? process.env.PUBLIC_BACK_URL
|
||||
: typeof window === "undefined"
|
||||
? process.env.KYOO_URL ?? "http://localhost:5000"
|
||||
: "/api";
|
||||
? process.env.KYOO_URL ?? "http://localhost:5000"
|
||||
: "/api";
|
||||
|
||||
export let kyooApiUrl: string | null = kyooUrl || null;
|
||||
|
||||
@ -71,8 +71,8 @@ export const queryFn = async <Data,>(
|
||||
"path" in context
|
||||
? (context.path.filter((x) => x) as string[])
|
||||
: "pageParam" in context && context.pageParam
|
||||
? [context.pageParam as string]
|
||||
: (context.queryKey.filter((x) => x) as string[]),
|
||||
? [context.pageParam as string]
|
||||
: (context.queryKey.filter((x) => x) as string[]),
|
||||
)
|
||||
.join("/")
|
||||
.replace("/?", "?");
|
||||
|
@ -499,7 +499,9 @@ export const Header = ({
|
||||
{...(data.watchStatus as ShowWatchStatus).nextEpisode!}
|
||||
watchedPercent={data.watchStatus?.watchedPercent || null}
|
||||
watchedStatus={data.watchStatus?.status || null}
|
||||
displayNumber={episodeDisplayNumber((data.watchStatus as ShowWatchStatus).nextEpisode!)!}
|
||||
displayNumber={
|
||||
episodeDisplayNumber((data.watchStatus as ShowWatchStatus).nextEpisode!)!
|
||||
}
|
||||
/>
|
||||
</Container>
|
||||
)}
|
||||
|
@ -83,12 +83,7 @@ export const GenreGrid = ({ genre }: { genre: Genre }) => {
|
||||
{(x, i) => {
|
||||
// only display empty list if a loading as been displayed (not durring ssr)
|
||||
if (x.isLoading) displayEmpty.current = true;
|
||||
return (
|
||||
<ItemGrid
|
||||
key={x.id ?? i}
|
||||
{...itemMap(x)}
|
||||
/>
|
||||
);
|
||||
return <ItemGrid key={x.id ?? i} {...itemMap(x)} />;
|
||||
}}
|
||||
</InfiniteFetchList>
|
||||
</>
|
||||
|
@ -89,7 +89,11 @@ export const WatchlistList = () => {
|
||||
) : (
|
||||
<View {...css({ justifyContent: "center", alignItems: "center" })}>
|
||||
<P>{t("home.watchlistLogin")}</P>
|
||||
<Button text={t("login.login")} href={"/login"} {...css({ minWidth: ts(24), margin: ts(2) })}/>
|
||||
<Button
|
||||
text={t("login.login")}
|
||||
href={"/login"}
|
||||
{...css({ minWidth: ts(24), margin: ts(2) })}
|
||||
/>
|
||||
</View>
|
||||
)}
|
||||
</>
|
||||
|
@ -68,7 +68,7 @@ export const WatchStatusObserver = ({
|
||||
// update watch status when play status change (and on mount).
|
||||
const isPlaying = useAtomValue(playAtom);
|
||||
useEffect(() => {
|
||||
mutate(readProgress())
|
||||
}, [type, slug, isPlaying, readProgress, mutate])
|
||||
mutate(readProgress());
|
||||
}, [type, slug, isPlaying, readProgress, mutate]);
|
||||
return null;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user