Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
191f32a
Adding updates to to-do-app-darius branch
phenomenalCode Jun 3, 2025
2461da6
React todo app.
phenomenalCode Jun 4, 2025
8dab096
Merge branch 'main' of https://github.com/phenomenalCode/to-do-list-app
phenomenalCode Jun 4, 2025
3e5b93f
Added submodule URL to .gitmodules
phenomenalCode Jun 4, 2025
953d3ad
Fixed Rollup bundling issue with zustand
phenomenalCode Jun 4, 2025
95a8e0c
Fixed zustand module resolution
phenomenalCode Jun 4, 2025
ebb2a47
Update README.md
phenomenalCode Jun 4, 2025
5811087
Updated main branch with latest changes
phenomenalCode Jun 4, 2025
88e8440
Update README.md
phenomenalCode Jun 4, 2025
fc435ad
Fix due date input and store in ISO format
phenomenalCode Jun 4, 2025
2cf4117
Update README.md
phenomenalCode Jun 4, 2025
e47942c
styling
phenomenalCode Aug 7, 2025
ff2e61f
styling
phenomenalCode Aug 7, 2025
71c6865
Merge branch 'main' of https://github.com/phenomenalCode/to-do-list-app
phenomenalCode Aug 7, 2025
ed3886e
Merge branch 'to-do-app-darius'
phenomenalCode Aug 7, 2025
61d9d5c
performance fix
phenomenalCode Aug 7, 2025
546abab
performance fixx2
phenomenalCode Aug 7, 2025
0e3c834
performance fixx3
phenomenalCode Aug 7, 2025
0b0fd7d
revert
phenomenalCode Aug 7, 2025
08711ad
checkbox fix
phenomenalCode Aug 7, 2025
745fdf3
heading semantics
phenomenalCode Aug 7, 2025
97eac5d
imports
phenomenalCode Aug 7, 2025
de91c05
Fix Chip contrast and dropdown text overflow
phenomenalCode Aug 22, 2025
0e56438
added some docs incase i run into same problem again
phenomenalCode Aug 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "to-do-list-app"]
path = to-do-list-app
url = https://github.com/phenomenalCode/to-do-list-app.git
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# Todo
# Todo

netlify: https://darius-to-do-app.netlify.app/
4 changes: 4 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta
name="description"
content="A sleek and responsive to-do list app built with React. Organize tasks, manage projects, and stay productive."
/>
<link rel="icon" type="image/svg+xml" href="./vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Todo</title>
Expand Down
12 changes: 10 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,16 @@
"preview": "vite preview"
},
"dependencies": {
"@date-io/date-fns": "^3.2.1",
"@emotion/react": "^11.14.0",
"@emotion/styled": "^11.14.0",
"@mui/lab": "^7.0.0-beta.13",
"@mui/material": "^7.1.0",
"@mui/x-date-pickers": "^8.5.0",
"date-fns": "^4.1.0",
"react": "^19.0.0",
"react-dom": "^19.0.0"
"react-dom": "^19.0.0",
"zustand": "^5.0.5"
},
"devDependencies": {
"@eslint/js": "^9.21.0",
Expand All @@ -22,6 +30,6 @@
"eslint-plugin-react-hooks": "^5.1.0",
"eslint-plugin-react-refresh": "^0.4.19",
"globals": "^15.15.0",
"vite": "^6.2.0"
"vite": "^6.3.5"
}
}
Binary file added public/photos/7247856.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
149 changes: 146 additions & 3 deletions src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,148 @@
import React, { useState, useMemo, useCallback } from 'react';
import { useTaskStore } from './store/useTaskStore';
import { Header } from './Header';
import { SubmitTask } from './SubmitTask';
import { DisplayTasks } from './DisplayTasks';
import { Footer } from './Footer';
import './index.css';
import {
Box,
Button,
Typography,
Paper,
Container,
CssBaseline,
createTheme,
ThemeProvider,
} from '@mui/material';

// // Optionally lazy load heavy components:
// const Header = React.lazy(() => import('./Header'));
// const SubmitTask = React.lazy(() => import('./SubmitTask'));
// const DisplayTasks = React.lazy(() => import('./DisplayTasks'));
// const Footer = React.lazy(() => import('./Footer'));

export const App = () => {
const [darkMode, setDarkMode] = useState(false);
const tasks = useTaskStore((s) => s.tasks);

// Memoize theme to prevent recreation on every render
const theme = useMemo(
() =>
createTheme({
palette: {
mode: darkMode ? 'dark' : 'light',
primary: {
main: darkMode ? '#9c27b0' : '#1976d2',
contrastText: '#fff',
},
background: {
default: darkMode ? '#000' : '#fff',
paper: darkMode ? '#1a1a1a' : '#f5f5f5',
},
},
}),
[darkMode]
);

const toggleDarkMode = useCallback(() => {
setDarkMode((prev) => !prev);
}, []);

const completeAll = () => {
const { tasks, toggleTaskCompletion } = useTaskStore.getState();
tasks.forEach((t) => !t.completed && toggleTaskCompletion(t.id));
};

return (
<h1>React Boilerplate</h1>
)
}
<ThemeProvider theme={theme}>
<CssBaseline />

<Box
sx={{
minHeight: '100vh',
backgroundImage: darkMode
? 'url(/photos/stars-night-galaxy-4k-3840x2160.webp)'
: 'url(/photos/7247856.webp)',
backgroundSize: 'cover',
backgroundPosition: 'center',
backgroundRepeat: 'no-repeat',
pb: { xs: 10, md: 8 },
}}
>
<Header />

<Container
maxWidth="xl"
sx={{
mt: { xs: 2, md: 4 },
px: { xs: 1, sm: 2, md: 4 },
display: 'flex',
gap: { xs: 2, md: 4 },
flexDirection: { xs: 'column', md: 'row' },
}}
>
<Box
className="display-tasks-wrapper"
sx={{
flex: { xs: '100%', md: '0 0 280px' },
display: 'block',
order: { xs: 2, md: 1 },
}}
>
<DisplayTasks />
</Box>

<Box
sx={(theme) => ({
order: { xs: 1, md: 2 },
flexGrow: 1,
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
gap: 3,
width: '100%',
maxWidth: { md: 900, lg: 1100 },
p: { xs: 2, sm: 3, md: 4 },
borderRadius: 2,
boxShadow: 4,
backgroundColor:
theme.palette.mode === 'dark'
? 'rgba(33,33,33,0.85)'
: 'rgba(255,255,255,0.85)',
color: theme.palette.text.primary,
})}
>
<Paper
elevation={4}
sx={{
p: { xs: 2, sm: 3 },
textAlign: 'center',
width: '100%',
maxWidth: 400,
}}
>
<Typography variant="h4" gutterBottom>
To Do List
</Typography>
<Typography variant="body1">Total Tasks: {tasks.length}</Typography>
<Typography variant="body1">
Uncompleted Tasks: {tasks.filter((t) => !t.completed).length}
</Typography>
</Paper>

<SubmitTask />

<Box sx={{ display: 'flex', gap: 2 }}>
<Button variant="contained" color="primary" onClick={toggleDarkMode}>
{darkMode ? 'Light Mode' : 'Dark Mode'}
</Button>
</Box>
</Box>
</Container>
</Box>

<Footer />
</ThemeProvider>
);
};
Loading