diff --git a/src/components/Home.tsx b/src/components/Home.tsx index 9fd4a20..e1386e1 100644 --- a/src/components/Home.tsx +++ b/src/components/Home.tsx @@ -1062,9 +1062,18 @@ export const Home: React.FC = ({ canEdit, isPortraitMode = false }) = } }, [groupedStudents, quickNavLayout.itemSize, quickNavLayout.paddingY]) + const shouldShowQuickNav = + groupedStudents.length > 1 && + sortType !== "score" && + !(sortType === "alphabet" && searchKeyword) + + const portraitListRightPadding = + isPortraitMode && shouldShowQuickNav + ? quickNavLayout.itemSize + quickNavLayout.paddingX * 2 + 16 + : 0 + const renderQuickNav = () => { - if (groupedStudents.length <= 1 || sortType === "score" || (sortType === "alphabet" && searchKeyword)) - return null + if (!shouldShowQuickNav) return null return (
= ({ canEdit, isPortraitMode = false }) = {renderQuickNav()} -
+
{loading ? (
{t("common.loading")}