ui: minor changes

This commit is contained in:
Prayag Prajapati committed 2024-02-24 14:50:31 +05:30
1 parent 455a499670
commit 599bdabf29
7 files changed
+307 -351

No files matched your search

+2 -1
View File
@@ -42,8 +42,9 @@
flex-direction: column;
align-items: stretch;
&-grid {
--number-of-cols:8;
display: grid;
grid-template-columns: repeat(8, minmax(0, 1fr));
grid-template-columns: repeat(var(--number-of-cols), minmax(0, 1fr));
justify-items: center;
align-items: start;
}
+15 -3
View File
@@ -158,7 +158,10 @@ const SeriesTitlePage = () => {
refetchOnWindowFocus: true,
});
const [currentSeason, setCurrentSeason] = useState(0);
const [currentSeason, setCurrentSeason] = useState(() => {
const result = sessionStorage.getItem(`season-${item.data?.Id}`);
return result ?? 0;
});
const currentSeasonItem = useQuery({
queryKey: ["item", id, "season", currentSeason],
@@ -232,7 +235,10 @@ const SeriesTitlePage = () => {
}, [item.isSuccess]);
useLayoutEffect(() => {
if (seasons.isSuccess) {
if (
seasons.isSuccess &&
!sessionStorage.getItem(`season-${item.data?.Id}`)
) {
if (
seasons.data.TotalRecordCount > 1 &&
seasons.data.Items[0].Name.toLowerCase().includes("special")
@@ -890,7 +896,13 @@ const SeriesTitlePage = () => {
)}
<TextField
value={currentSeason}
onChange={(e) => setCurrentSeason(e.target.value)}
onChange={(e) => {
setCurrentSeason(e.target.value);
sessionStorage.setItem(
`season-${item.data?.Id}`,
e.target.value,
);
}}
select
SelectProps={{
MenuProps: {