Format front

This commit is contained in:
Zoe Roux 2023-12-06 23:38:31 +01:00
parent f438e80d3a
commit f536713f04
6 changed files with 16 additions and 15 deletions

View File

@ -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 {

View File

@ -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>
)}

View File

@ -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>
</>

View File

@ -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>
)}
</>

View File

@ -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;
};