From 977d701c09f8858f08f9ebf2e442623968bc211a Mon Sep 17 00:00:00 2001 From: Hikmet Date: Fri, 8 Sep 2023 15:44:52 +0300 Subject: [PATCH] theme page tab-bar fixed --- src/features/theme_page/view/tab_bar.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/features/theme_page/view/tab_bar.tsx b/src/features/theme_page/view/tab_bar.tsx index 459406e..d2cf43a 100644 --- a/src/features/theme_page/view/tab_bar.tsx +++ b/src/features/theme_page/view/tab_bar.tsx @@ -5,7 +5,6 @@ import { BaseViewModel } from "../model/base_view_model"; export function TabBar() { const { lessons, activeLesson, setActiveLesson } = useBaseViewModelContext() as BaseViewModel; - if (activeLesson === null) return null; return ( @@ -13,9 +12,10 @@ export function TabBar() { variant="scrollable" scrollButtons={true} allowScrollButtonsMobile - value={activeLesson} centered + value={activeLesson} onChange={(e, newValue) => setActiveLesson(newValue)} + sx={{ maxWidth: "100%", width: "max-content", margin: "0 auto" }} > {lessons.map(({ id }, i: number) => { return ;