From f0b1130da23719690b37cb270c54745c09998ec5 Mon Sep 17 00:00:00 2001 From: Primakov Alexandr Alexandrovich Date: Tue, 4 Nov 2025 10:37:24 +0300 Subject: [PATCH] Update Layout component to use 95% width for the main container. Enhance TaskFormPage with responsive tabs for mobile and desktop layouts, improving user experience for editing and previewing task descriptions. --- src/components/Layout.tsx | 2 +- src/pages/tasks/TaskFormPage.tsx | 77 ++++++++++++++++++++++++++------ 2 files changed, 65 insertions(+), 14 deletions(-) diff --git a/src/components/Layout.tsx b/src/components/Layout.tsx index 7645e14..2790daf 100644 --- a/src/components/Layout.tsx +++ b/src/components/Layout.tsx @@ -122,7 +122,7 @@ export const Layout: React.FC = ({ children }) => { {/* Main Content */} - + {children} diff --git a/src/pages/tasks/TaskFormPage.tsx b/src/pages/tasks/TaskFormPage.tsx index 7884239..6ac4cb4 100644 --- a/src/pages/tasks/TaskFormPage.tsx +++ b/src/pages/tasks/TaskFormPage.tsx @@ -12,6 +12,7 @@ import { Text, Field, Tabs, + Grid, } from '@chakra-ui/react' import ReactMarkdown from 'react-markdown' import { @@ -146,25 +147,73 @@ export const TaskFormPage: React.FC = () => { {/* Description with Markdown */} {t('challenge.admin.tasks.field.description')} - setShowDescPreview(e.value === 'preview')} + + {/* Табы для мобильных */} + setShowDescPreview(e.value === 'preview')} + > + + {t('challenge.admin.tasks.tab.editor')} + {t('challenge.admin.tasks.tab.preview')} + + +