Skip to content

Commit 73c10f6

Browse files
fix: Restore working App.jsx and add mobile-responsive CSS and HTML improvements
1 parent 83aa59d commit 73c10f6

2 files changed

Lines changed: 4 additions & 103 deletions

File tree

src/App.jsx

Lines changed: 3 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,7 @@ import {
3131
ClickAwayListener,
3232
Popper,
3333
Grow,
34-
CircularProgress,
35-
useMediaQuery,
36-
Drawer,
37-
List,
38-
ListItem,
39-
ListItemIcon,
40-
ListItemText,
41-
BottomNavigation,
42-
BottomNavigationAction,
43-
Collapse
34+
CircularProgress
4435
} from '@mui/material'
4536
import {
4637
DarkMode,
@@ -54,11 +45,7 @@ import {
5445
AutoAwesome,
5546
Terminal,
5647
MenuBook,
57-
Shuffle,
58-
Menu,
59-
Close,
60-
ExpandMore,
61-
ExpandLess
48+
Shuffle
6249
} from '@mui/icons-material'
6350

6451
import { questions } from './data/questions'
@@ -233,11 +220,6 @@ function App() {
233220
const [showTopicInfo, setShowTopicInfo] = useState(false)
234221
const [snackbar, setSnackbar] = useState({ open: false, message: '', severity: 'info' })
235222

236-
// Mobile navigation state
237-
const [mobileDrawerOpen, setMobileDrawerOpen] = useState(false)
238-
const [mobileBottomNav, setMobileBottomNav] = useState(0) // 0: Question, 1: About, 2: Console
239-
const [mobileCodeExpanded, setMobileCodeExpanded] = useState(false)
240-
241223
// New state for database
242224
const [questionDatabase, setQuestionDatabase] = useState(null)
243225
const [isLoading, setIsLoading] = useState(true)
@@ -704,7 +686,7 @@ function App() {
704686
}
705687
}, [activeTopic, currentTopicQuestion, selectedDifficulty])
706688

707-
// Google-inspired Theme with Mobile Responsiveness
689+
// Google-inspired Theme
708690
const theme = createTheme({
709691
palette: {
710692
mode: darkMode ? 'dark' : 'light',
@@ -739,97 +721,15 @@ function App() {
739721
h4: {
740722
fontWeight: 500,
741723
letterSpacing: '0',
742-
'@media (max-width:600px)': {
743-
fontSize: '1.75rem',
744-
},
745724
},
746725
h5: {
747726
fontWeight: 500,
748727
letterSpacing: '0',
749-
'@media (max-width:600px)': {
750-
fontSize: '1.5rem',
751-
},
752728
},
753729
h6: {
754730
fontWeight: 500,
755731
letterSpacing: '0',
756-
'@media (max-width:600px)': {
757-
fontSize: '1.25rem',
758-
},
759-
},
760-
body1: {
761-
letterSpacing: '0.25px',
762-
'@media (max-width:600px)': {
763-
fontSize: '0.9rem',
764-
},
765-
},
766-
body2: {
767-
letterSpacing: '0.25px',
768-
'@media (max-width:600px)': {
769-
fontSize: '0.8rem',
770-
},
771-
},
772-
button: {
773-
textTransform: 'none',
774-
fontWeight: 500,
775-
letterSpacing: '0.25px',
776-
'@media (max-width:600px)': {
777-
fontSize: '0.875rem',
778-
},
779-
},
780-
},
781-
shape: {
782-
borderRadius: 8,
783-
},
784-
breakpoints: {
785-
values: {
786-
xs: 0,
787-
sm: 600,
788-
md: 960,
789-
lg: 1280,
790-
xl: 1920,
791-
},
792-
},
793-
components: {
794-
MuiButton: {
795-
styleOverrides: {
796-
root: {
797-
borderRadius: 24,
798-
padding: '8px 24px',
799-
boxShadow: 'none',
800-
minHeight: 44, // Touch-friendly minimum height
801-
'@media (max-width:600px)': {
802-
padding: '12px 20px',
803-
minHeight: 48,
804-
fontSize: '0.875rem',
805-
},
806-
'&:hover': {
807-
boxShadow: '0 1px 3px 0 rgba(60,64,67,.3), 0 4px 8px 3px rgba(60,64,67,.15)',
808-
},
809-
},
810-
},
811732
},
812-
MuiIconButton: {
813-
styleOverrides: {
814-
root: {
815-
'@media (max-width:600px)': {
816-
padding: '12px', // Larger touch target
817-
},
818-
},
819-
},
820-
},
821-
MuiPaper: {
822-
styleOverrides: {
823-
root: {
824-
boxShadow: '0 1px 2px 0 rgba(60,64,67,.3), 0 1px 3px 1px rgba(60,64,67,.15)',
825-
},
826-
},
827-
},
828-
},
829-
})
830-
831-
// Mobile responsive detection
832-
const isMobile = useMediaQuery(theme.breakpoints.down('md'))
833733
body1: {
834734
letterSpacing: '0.25px',
835735
},

src/App_backup.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// Backup of original App.jsx

0 commit comments

Comments
 (0)