From 5e9607170b252d35e9ea04e76bd5c75ce415f2f4 Mon Sep 17 00:00:00 2001
From: Jithin7777 <133039735+Jithin7777@users.noreply.github.com>
Date: Wed, 12 Mar 2025 12:03:36 +0530
Subject: [PATCH] feature1
---
src/App.js | 249 +++++++++++------------------------------------------
1 file changed, 51 insertions(+), 198 deletions(-)
diff --git a/src/App.js b/src/App.js
index e7c05b5..b108ed9 100644
--- a/src/App.js
+++ b/src/App.js
@@ -1,199 +1,52 @@
-import {
- Button,
- Container,
- Text,
- Title,
- Modal,
- TextInput,
- Group,
- Card,
- ActionIcon,
- Code,
-} from '@mantine/core';
-import { useState, useRef, useEffect } from 'react';
-import { MoonStars, Sun, Trash } from 'tabler-icons-react';
-
-import {
- MantineProvider,
- ColorSchemeProvider,
- ColorScheme,
-} from '@mantine/core';
-import { useColorScheme } from '@mantine/hooks';
-import { useHotkeys, useLocalStorage } from '@mantine/hooks';
-
-export default function App() {
- const [tasks, setTasks] = useState([]);
- const [opened, setOpened] = useState(false);
-
- const preferredColorScheme = useColorScheme();
- const [colorScheme, setColorScheme] = useLocalStorage({
- key: 'mantine-color-scheme',
- defaultValue: 'light',
- getInitialValueInEffect: true,
- });
- const toggleColorScheme = value =>
- setColorScheme(value || (colorScheme === 'dark' ? 'light' : 'dark'));
-
- useHotkeys([['mod+J', () => toggleColorScheme()]]);
-
- const taskTitle = useRef('');
- const taskSummary = useRef('');
-
- function createTask() {
- setTasks([
- ...tasks,
- {
- title: taskTitle.current.value,
- summary: taskSummary.current.value,
- },
- ]);
-
- saveTasks([
- ...tasks,
- {
- title: taskTitle.current.value,
- summary: taskSummary.current.value,
- },
- ]);
- }
-
- function deleteTask(index) {
- var clonedTasks = [...tasks];
-
- clonedTasks.splice(index, 1);
-
- setTasks(clonedTasks);
-
- saveTasks([...clonedTasks]);
- }
-
- function loadTasks() {
- let loadedTasks = localStorage.getItem('tasks');
-
- let tasks = JSON.parse(loadedTasks);
-
- if (tasks) {
- setTasks(tasks);
- }
- }
-
- function saveTasks(tasks) {
- localStorage.setItem('tasks', JSON.stringify(tasks));
- }
-
- useEffect(() => {
- loadTasks();
- }, []);
-
- return (
-