diff --git a/README.md b/README.md
index c0e3586..0497edf 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,7 @@
# React-Learning-Projects 🚀🛠️
+
👨💻👩💻
Welcome to the React Learning Projects repository! This collection of hands-on projects is designed to help you learn React while building small, practical applications.
diff --git a/package-lock.json b/package-lock.json
index 97756dc..ca5420e 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -18,8 +18,10 @@
"react-dom": "^18.2.0",
"react-icons": "^4.10.1",
"react-player": "^2.13.0",
+ "react-redux": "^9.1.0",
"react-router-dom": "^6.15.0",
- "react-scripts": "5.0.1",
+ "react-scripts": "^5.0.1",
+ "redux": "^5.0.1",
"web-vitals": "^2.1.4"
}
},
@@ -4411,9 +4413,9 @@
"integrity": "sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw=="
},
"node_modules/@types/react": {
- "version": "18.2.18",
- "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.18.tgz",
- "integrity": "sha512-da4NTSeBv/P34xoZPhtcLkmZuJ+oYaCxHmyHzwaDQo9RQPBeXV+06gEk2FpqEcsX9XrnNLvRpVh6bdavDSjtiQ==",
+ "version": "18.2.48",
+ "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.48.tgz",
+ "integrity": "sha512-qboRCl6Ie70DQQG9hhNREz81jqC1cs9EVNcjQ1AU+jH6NFfSAhVVbrrY/+nSF+Bsk4AOwm9Qa61InvMCyV+H3w==",
"dependencies": {
"@types/prop-types": "*",
"@types/scheduler": "*",
@@ -4504,6 +4506,11 @@
"resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.3.tgz",
"integrity": "sha512-NfQ4gyz38SL8sDNrSixxU2Os1a5xcdFxipAFxYEuLUlvU2uDwS4NUpsImcf1//SlWItCVMMLiylsxbmNMToV/g=="
},
+ "node_modules/@types/use-sync-external-store": {
+ "version": "0.0.3",
+ "resolved": "https://registry.npmjs.org/@types/use-sync-external-store/-/use-sync-external-store-0.0.3.tgz",
+ "integrity": "sha512-EwmlvuaxPNej9+T4v5AuBPJa2x2UOJVdjCtDHgcDqitUeOtjnJKJ+apYjVcAoBEMjKW1VVFGZLUb5+qqa09XFA=="
+ },
"node_modules/@types/ws": {
"version": "8.5.5",
"resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.5.tgz",
@@ -14654,6 +14661,32 @@
"react": ">=16.6.0"
}
},
+ "node_modules/react-redux": {
+ "version": "9.1.0",
+ "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-9.1.0.tgz",
+ "integrity": "sha512-6qoDzIO+gbrza8h3hjMA9aq4nwVFCKFtY2iLxCtVT38Swyy2C/dJCGBXHeHLtx6qlg/8qzc2MrhOeduf5K32wQ==",
+ "dependencies": {
+ "@types/use-sync-external-store": "^0.0.3",
+ "use-sync-external-store": "^1.0.0"
+ },
+ "peerDependencies": {
+ "@types/react": "^18.2.25",
+ "react": "^18.0",
+ "react-native": ">=0.69",
+ "redux": "^5.0.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/react": {
+ "optional": true
+ },
+ "react-native": {
+ "optional": true
+ },
+ "redux": {
+ "optional": true
+ }
+ }
+ },
"node_modules/react-refresh": {
"version": "0.11.0",
"resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.11.0.tgz",
@@ -14819,6 +14852,11 @@
"node": ">=8"
}
},
+ "node_modules/redux": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/redux/-/redux-5.0.1.tgz",
+ "integrity": "sha512-M9/ELqF6fy8FwmkpnF0S3YKOqMyoWJ4+CS5Efg2ct3oY9daQvd/Pc71FpGZsVsbl3Cpb+IIcjBDUnnyBdQbq4w=="
+ },
"node_modules/regenerate": {
"version": "1.4.2",
"resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz",
@@ -16682,6 +16720,14 @@
"requires-port": "^1.0.0"
}
},
+ "node_modules/use-sync-external-store": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz",
+ "integrity": "sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==",
+ "peerDependencies": {
+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0"
+ }
+ },
"node_modules/util-deprecate": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
diff --git a/package.json b/package.json
index 0214769..23d9e9c 100644
--- a/package.json
+++ b/package.json
@@ -13,8 +13,10 @@
"react-dom": "^18.2.0",
"react-icons": "^4.10.1",
"react-player": "^2.13.0",
+ "react-redux": "^9.1.0",
"react-router-dom": "^6.15.0",
- "react-scripts": "5.0.1",
+ "react-scripts": "^5.0.1",
+ "redux": "^5.0.1",
"web-vitals": "^2.1.4"
},
"scripts": {
diff --git a/src/App.js b/src/App.js
index 983f781..041d506 100644
--- a/src/App.js
+++ b/src/App.js
@@ -1,12 +1,57 @@
-import React from 'react'
-import TachesGestion from './components/tachesGestion'
+///////////////////// Redux Test 3 MINI Game Change my Color !////////////////////
+import React, { useState } from "react";
+import { useDispatch, useSelector } from "react-redux";
+import './style/app.css'
const App = () => {
+ const [ucolor, setUcolor] = useState('')
+ const [utext, setUtext] = useState('')
+ const color = useSelector((state) => state.color)
+ const historiqueColor = useSelector((state) => state.hestoC)
+ const historiqueText = useSelector((state) => state.hestoT)
+ const text = useSelector((state) => state.text)
+ const dipatch = useDispatch()
+ const ChangeC = () => {
+ dipatch({ type: 'ChangeC', payload: ucolor })
+ }
+ const ChangeT = () => {
+ dipatch({ type: 'ChangeT', payload: utext })
+ }
return (
-
-
your name is {users.name}
- {users.email}
+
+
+
Enter a number and get FILM
+
+ setNumber(e.target.value)} />
+ {film}
+ {N}
+
+
);
-}
-const Root = () => {
+};
+
+export default App;
+
+
+
+
+
+
+
+
+
+
+
+
+
+/*
+///////////////////// Redux Test 2 MINI CALCULE////////////////////
+import {React,useState} from "react";
+import './style/app.css';
+import { useDispatch, useSelector } from "react-redux";
+
+const App = () => {
+ const resultat =useSelector((state)=>state.resultats)
+ const operation =useSelector((state)=>state.operation)
+
+ const [nb1,setNb1]=useState(0)
+ const [nb2,setNb2]=useState(0)
+ const dis =useDispatch()
+ const SOMME=()=>{
+ dis({type:'SOMME',payload:[nb1,nb2]})
+ }
+ const SOUSTRA=()=>{
+ dis({type:'SOUSTRA',payload:[nb1,nb2]})
+ }
+ const MULTIP=()=>{
+ dis({type:'MULTIP',payload:[nb1,nb2]})
+ }
+ const DIVIS=()=>{
+ dis({type:'DIVIS',payload:[nb1,nb2]})
+ }
+
+
return (
-
- )
-}
-export default Root;
+ <>
+
+
Mini Calcule
+
setNb1(e.target.value)}/>
+
+
setNb2(e.target.value)} />
+
+
+
+
+
+
+
+
{operation} = {resultat}
+
+ >
+ )
+}
+export default App
@@ -67,36 +184,114 @@ export default Root;
+/*
+import React, { useEffect, useState } from 'react';
+import { useDispatch, useSelector } from 'react-redux';
+const App = () => {
+ const [pas, setPas] = useState(0);
+ const nb = useSelector((state) => state.counter);
+ const dis = useDispatch()
+ const Increment = () => {
+ dis({ type: 'INC' })
+ }
+ const Decrement = () => {
+ dis({ type: 'DEC' })
+ }
+ useEffect(() => {
+ dis({ type: 'ADDN', payload: pas })
+ }, [pas])
-*/
+ return (
+
+
+ hello {nb}
+
+
+
+
+ setPas(e.target.value)} />
+
+
+ );
+};
+export default App;
+/*
+//////////// UseEfect
+import React from 'react'
+import EffectHook from './components/effectHook'
+export default function App() {
+ return (
+
+
+
+ )
+}
+*/
+/*
+import TachesGestion from './components/tachesGestion'
+const App = () => {
+ return (
+
+
+
+ )
+}
+export default App
+*/
+//////////////// T3 /////////////
+// Context Api
+/*
+import React from "react";
+import { UserProvider, useUsers } from "./components/contextApi";
+function App() {
+ const {users}=useUsers()
+ return (
+
+
your name is {users.name}
+ {users.email}
+
+ );
+}
+const Root = () => {
+ return (
+
+ )
+}
+export default Root;
+/////////////////
+*/
//////////////// T1 /////////////
- // base 1
+// base 1
-/*
+/*
import M1 from "./components/el1";
import M2 from './components/el2';
import React from "react";
@@ -116,44 +311,43 @@ function test1() {
let age = 19;
return (
-
+
-
+
hello {Name}
{age >= 18 ? "vous êtes adulte" : "petit"}
-
+
{
-
-
+
+
}
);
}
-export default test1;
+export default test1;
/// Methode 2
class test2 extends React.Component{
render(){
- return
k
+ return
k
}
}
export default test2; */
-
//////////////// T2 /////////////
- // base 2
+// base 2
/*
import T from "./components/css-jsx";
import N from "./components/nav";
@@ -214,4 +408,4 @@ const Test1 = () => {
};
export default Test1;
-*/
\ No newline at end of file
+*/
diff --git a/src/app/store.js b/src/app/store.js
new file mode 100644
index 0000000..44889fc
--- /dev/null
+++ b/src/app/store.js
@@ -0,0 +1,138 @@
+///////////////////// Redux Test 3 MINI Game Change my Color !///////////////////
+import {createStore} from 'redux'
+
+const initialeState={color:'',text:'Hello change me !',hestoC:[],hestoT:[]}
+const reducer =(state=initialeState,{type,payload})=>{
+ switch (type){
+ case 'ChangeC':
+ return {...state,color:payload || '',hestoC:[...state.hestoC,payload]}
+ case 'ChangeT' :
+ return {...state,text:payload,hestoT:[...state.hestoT,payload]}
+ default :
+ return state
+ }
+}
+const store =createStore(reducer)
+export default store
+
+
+
+
+
+/*///////////////////// Redux Test 3 MINI Game Number Film////////////////////
+import { createStore } from "redux";
+
+
+const initialeState ={number:0,film :''};
+const reducer = (state=initialeState,{type,payload})=>{
+ if (type==='submit'){
+ const num =Number(payload)
+ fetch(`https://api.themoviedb.org/3/movie/${num}?api_key=0269e1f69afd6ff169f8a6a2d9f0dc4d`)
+ .then(response => response.json()) // Convert the response to JSON
+ .then(data => {
+ return {
+ number: data.id,
+ film: data.original_title,
+ };
+ })
+ .catch(error => {
+ // Handle any errors that may occur during the fetch
+ console.error('Error fetching data:', error);
+ });
+
+
+
+ }
+ return state
+}
+
+const store =createStore(reducer)
+export default store
+
+
+
+
+
+// `https://api.themoviedb.org/3/trending/movie/day?api_key=0269e1f69afd6ff169f8a6a2d9f0dc4d`);
+
+
+
+
+
+
+
+///////////////////// Redux Test 2 MINI CALCULE////////////////////
+/*
+import { createStore } from 'redux';
+
+const initialeState = { operation: '', resultats: '' }
+const reducer = (state = initialeState, { type, payload }) => {
+ switch (type) {
+ case 'SOMME':
+ return { resultats: Number(payload[0]) + Number(payload[1]), operation: payload[0] + "+" + payload[1] }
+ case 'SOUSTRA':
+ return { resultats: Number(payload[0]) - Number(payload[1]), operation: payload[0] + "-" + payload[1] }
+
+ case 'MULTIP':
+ return { resultats: Number(payload[0]) * Number(payload[1]), operation: payload[0] + "*" + payload[1] }
+
+ case 'DIVIS':
+ return { resultats: Number(payload[0]) / Number(payload[1]), operation: payload[0] + "%" + payload[1] }
+
+ }
+ return state
+}
+
+const store = createStore(reducer)
+
+export default store
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+///////////////////// Redux Test 1 ////////////////////
+/*
+import { createStore } from "redux";
+const initialState={counter :0};
+const reducer = (state=initialState,{type,payload})=>{
+ switch (type) {
+ case 'INC' :
+ return {counter : state.counter+1}
+ case 'DEC' :
+ return {counter : state.counter-1}
+ case 'ADDN' :
+ return {counter :state.counter +Number(payload)}
+ default :
+ return state
+ }
+
+
+
+}
+const store =createStore(reducer)
+
+export default store
+
+
+*/
+
+
+
+
+
+
+
+
diff --git a/src/components/AXIOS.jsx b/src/components/AXIOS.jsx
new file mode 100644
index 0000000..a067208
--- /dev/null
+++ b/src/components/AXIOS.jsx
@@ -0,0 +1,68 @@
+import React, { useState } from 'react';
+
+export default function AXIOS() {
+ const [users, setUsers] = useState([]);
+ const [todo, setTodo] = useState([]);
+ const [listT, setListT] = useState([]);
+
+ function AfficheU() {
+ fetch('https://jsonplaceholder.typicode.com/users')
+ .then((response) => response.json())
+ .then((don) => setUsers(don));
+ }
+
+ function AfficheT(e) {
+ var id = e.target.value;
+ fetch(`https://jsonplaceholder.typicode.com/todos/${id}`)
+ .then((response) => response.json())
+ .then((don) => setTodo([don]));
+ }
+
+ function AfficheLT() {
+ fetch(`https://jsonplaceholder.typicode.com/todos`)
+ .then((response) => response.json())
+ .then((don) => setListT(don)); // Correction ici
+ }
+
+ return (
+
+
+
{' '}
+
+
+ {users.map((e, i) => (
+
+ {' '}
+ le Nom : {e.name}{' '}
+ le Prenom : {e.username}{' '}
+
+ {todo.length > 0 && e.id === todo[0].userId && (
+
+ {todo.map((t, j) => (
+ -
+ Todo: {t.title}
+
+
+ ))}
+
+ )}
+
+ ))}
+
+
+
{' '}
+ {listT.map((e, i) => (
+
+ {' '}
+ Title : {e.title}
+
+ ))}
+
+ );
+}
diff --git a/src/components/AddTodo.jsx b/src/components/AddTodo.jsx
new file mode 100644
index 0000000..1686ac5
--- /dev/null
+++ b/src/components/AddTodo.jsx
@@ -0,0 +1,44 @@
+import React, { Component } from 'react';
+import PropTypes from 'prop-types';
+
+export class AddTodo extends Component {
+ state = {
+ title: ''
+ }
+
+ onSubmit = (e) => {
+ e.preventDefault();
+ this.props.addTodo(this.state.title);
+ this.setState({ title: '' });
+ }
+
+ onChange = (e) => this.setState({ [e.target.name]: e.target.value });
+
+ render() {
+ return (
+
+ )
+ }
+}
+
+// PropTypes
+AddTodo.propTypes = {
+ addTodo: PropTypes.func.isRequired
+}
+
+export default AddTodo
diff --git a/src/components/Affiche_Editer_Chercher.jsx b/src/components/Affiche_Editer_Chercher.jsx
new file mode 100644
index 0000000..b1f84d0
--- /dev/null
+++ b/src/components/Affiche_Editer_Chercher.jsx
@@ -0,0 +1,137 @@
+import React, { useState } from "react";
+
+const Affiche = () => {
+ const [vr, setVr] = useState(false);
+ const [editingId, setEditingId] = useState(null);
+
+ const [cher,setCher]=useState('')
+ const [editedData, setEditedData] = useState({
+ id: "",
+ nom: "",
+ prenom: "",
+ });
+ const [listC ,setListC] = useState([
+ {
+ id: 1,
+ nom: "najam",
+ prenom: "imad",
+ },
+ {
+ id: 2,
+ nom: "lolo",
+ prenom: "lili",
+ },
+ {
+ id: 3,
+ nom: "toto",
+ prenom: "titi",
+ },
+ {
+ id: 4,
+ nom: "roro",
+ prenom: "riri",
+ },
+ {
+ id: 5,
+ nom: "moro",
+ prenom: "moro",
+ },
+ ]);
+ function Liste() {
+ return (
+
+ {listC.map((e, i) => (
+ -
+ {e.id} -- {e.nom} -- {e.prenom} --------------{" "}
+ {" "}
+
+
+ ))}
+
+ );
+ }
+
+ function Supprimer(id) {
+
+ setListC(listC.filter((e)=> e.id!==id))
+ alert( "l'element : " + id +' est supprimer' )
+ }
+
+ function Aediter(item) {
+ setVr(true);
+ setEditingId(item.id);
+ setEditedData({
+ id: item.id,
+ nom: item.nom,
+ prenom: item.prenom,
+ })
+ setListC(listC.filter((e)=> e.id!==item.id))
+
+ }
+ function handleInputChange(e) {
+
+ const { name, value } = e.target;
+ setEditedData((prevData) => ({
+ ...prevData,
+ [name]: value,
+ }));
+
+
+ }
+ function handleEditSubmit() {
+
+ setListC([...listC,editedData])
+
+
+ console.log("Submit Edit", editedData);
+ setVr(false);
+ setEditingId(null);
+ }
+ function CherF(){
+ const lis=listC.filter((e) => e.id===cher) ;
+ return(
+
+
+ { lis.map((e,i)=>(
+ - {e.id} , {e.nom} , {e.prenom}
+ )) }
+
+
+ )
+
+ }
+
+
+ return (
+
+
+ );
+
+};
+
+export default Affiche;
diff --git a/src/components/CRUD.jsx b/src/components/CRUD.jsx
new file mode 100644
index 0000000..55d3b3a
--- /dev/null
+++ b/src/components/CRUD.jsx
@@ -0,0 +1,59 @@
+import React, { useState } from 'react';
+const CRUD = () => {
+ const [Matricul, SetMatricul] = useState('');
+ const [nom, Setnom] = useState('');
+ const [Prenom, SetPrenom] = useState('');
+ const [Salaire, SetSalaire] = useState('');
+ const [listClients, SetlistClients] = useState([]);
+ function addClienst(e) {
+ e.preventDefault();
+ const flag = listClients.find((e) => e.Matricul === Matricul);
+
+ if (!flag) {
+ SetlistClients(
+ [
+ ...listClients,
+ { Matricul: Matricul, nom: nom, Prenom: Prenom, Salaire: Salaire }
+ ]);
+ }
+ SetMatricul('');
+ Setnom('');
+ SetPrenom('');
+ SetSalaire('');
+ }
+ function DeleteLigne(mle) {
+ SetlistClients(listClients.filter(el => el.Matricul !== mle.target.value))
+ }
+
+ return (
+
+
+
Gestions des clients
+
+
+
Liste des clients
+
+ Matricul | nom | Prenom | Salaire |
+
+ {listClients.length===0?aucune données
:listClients.map((e, k) => {
+ return (
+
+ {e.Matricul} | {e.nom} | {e.Prenom} | {e.Salaire} MAD | |
+
+ );
+ })}
+
+
+
+
+
+ );
+}
+
+export default CRUD;
diff --git a/src/components/MiniCalcule.jsx b/src/components/MiniCalcule.jsx
new file mode 100644
index 0000000..c9823f0
--- /dev/null
+++ b/src/components/MiniCalcule.jsx
@@ -0,0 +1,115 @@
+import { React, useEffect, useState } from "react";
+
+const MiniCalcule = () => {
+ const [Z1, setZ1] = useState(0);
+ const [Z2, setZ2] = useState(0);
+
+ const [op, setop] = useState("");
+ const [resultas, setResultas] = useState(0);
+ const [Addition, setAddition] = useState(-1);
+ const [Soustraction, setSoustraction] = useState(-1);
+ const [Multiplication, setMultiplication] = useState(-1);
+ const [Division, setDivision] = useState(-1);
+ const [nbOp1, setNbOp1] = useState(-1);
+ const [nbOp2, setNbOp2] = useState(-1);
+ const [nbOp3, setNbOp3] = useState(-1);
+ const [nbOp4, setNbOp4] = useState(-1);
+ const [nbOp5, setNbOp5] = useState(-1);
+ useEffect(() => {
+ setAddition(Addition + 1);
+ }, [nbOp1]);
+ useEffect(() => {
+ setSoustraction(Soustraction + 1);
+ }, [nbOp2]);
+ useEffect(() => {
+ setMultiplication(Multiplication + 1);
+ }, [nbOp3]);
+ useEffect(() => {
+ setDivision(Division + 1);
+ }, [nbOp4]);
+ useEffect(() => {
+ setNbOp5(nbOp5 + 1);
+ }, [resultas]);
+
+ function calcul(e) {
+ if (e == "+") {
+ if (Z1 >= 1 && Z2 >= 1) {
+ setNbOp1(nbOp1 + 1);
+
+ setop(Z1 + "+" + Z2);
+ setResultas(Z1 + Z2);
+ } else setResultas("eror");
+ }
+ if (e == "-") {
+ if (Z1 > Z2) {
+ setNbOp2(nbOp2 + 1);
+ setResultas(Z1 - Z2);
+ setop(Z1 + "-" + Z2);
+ } else setResultas("eror Z1 < Z2");
+ }
+ if (e == "*") {
+ if (Z1 > 1 && Z2 > 1) {
+ setNbOp3(nbOp3 + 1);
+ setop(Z1 + "*" + Z2);
+ setResultas(Z1 * Z2);
+ } else setResultas("eror");
+ }
+ if (e == "/") {
+ if (Z1 > 1 && Z2 > 1) {
+ setNbOp4(nbOp4 + 1);
+ setop(Z1 + "/" + Z2);
+ setResultas(Z1 / Z2);
+ } else setResultas("eror division par 0");
+ }
+ }
+
+ return (
+
+ );
+};
+
+export default MiniCalcule;
diff --git a/src/components/TodoList.js b/src/components/TodoList.js
new file mode 100644
index 0000000..bdcfe90
--- /dev/null
+++ b/src/components/TodoList.js
@@ -0,0 +1,71 @@
+import React, { useState } from "react";
+
+const TodoList = () => {
+ const [todos, setTodos] = useState([]);
+ const [newTodo, setNewTodo] = useState("");
+
+ const handleAddTodo = () => {
+ if (newTodo.trim() !== "") {
+ setTodos([...todos, { text: newTodo.trim(), checked: false }]);
+ setNewTodo("");
+ }
+ };
+
+ const handleDeleteTodo = (index) => {
+ const newTodos = [...todos];
+ newTodos.splice(index, 1);
+ setTodos(newTodos);
+ };
+
+ const handleToggleTodo = (index) => {
+ const newTodos = [...todos];
+ newTodos[index].checked = !newTodos[index].checked;
+ setTodos(newTodos);
+ };
+
+ return (
+
+
To-Do List
+
setNewTodo(e.target.value)}
+ />
+
+
+
+ );
+};
+
+export default TodoList;
diff --git a/src/components/css-jsx.js b/src/components/css-jsx.js
index a1ab176..9b09b30 100644
--- a/src/components/css-jsx.js
+++ b/src/components/css-jsx.js
@@ -5,8 +5,10 @@ import ReactPlayer from "react-player";
// import C from '../assets/images/camera.png';
const T = (arg) => {
const im = {
- width: '50px',
- heightt: '50px'
+ width: '90px',
+ heightt: '90px'
+
+
}
const v1='https://www.youtube.com/watch?v=45QLb6M_6A0'
diff --git a/src/components/effectHook.jsx b/src/components/effectHook.jsx
new file mode 100644
index 0000000..e75ad1a
--- /dev/null
+++ b/src/components/effectHook.jsx
@@ -0,0 +1,22 @@
+import {React,useEffect,useState} from 'react'
+
+const EffectHook = () => {
+
+ const[num,setnum] = useState(0);
+ const[ver,setver] = useState(false);
+
+
+ useEffect(()=>{
+ setnum(1+num);
+
+ },[ver])
+
+ return (
+
+
+
+
+ )
+}
+
+export default EffectHook
diff --git a/src/index.js b/src/index.js
index a4e3746..cff70b0 100644
--- a/src/index.js
+++ b/src/index.js
@@ -4,12 +4,17 @@ import './index.css';
import App from './App';
import reportWebVitals from './reportWebVitals';
import { BrowserRouter } from 'react-router-dom';
+import { Provider } from 'react-redux';
+import Store from './app/store'
const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
-
+
+
+
+
);
diff --git a/src/style/app.css b/src/style/app.css
new file mode 100644
index 0000000..e7bfffd
--- /dev/null
+++ b/src/style/app.css
@@ -0,0 +1,45 @@
+.container {
+ display: flex;
+ justify-content: center;
+ align-items: center; /* Add vertical centering */
+ flex-direction: column;
+ text-align: center;
+}
+
+.container2 {
+ display: flex;
+ justify-content: center;
+ align-items: center; /* Add vertical centering */
+ gap: 10px;
+
+}
+.Mini{
+ text-align: center;
+ color: teal;
+ font-size: x-large;
+}
+
+button {
+ width: 200px;
+ height: 20px;
+
+ border: none;
+ background-color: rgb(211, 24, 89);
+ color: white;
+ cursor: pointer;
+}
+input {
+ text-align: center;
+ width: 200px; /* Adjust the width as needed */
+ padding: 10px;
+ border: 2px solid #3498db; /* Border color */
+ border-radius: 5px; /* Rounded corners */
+ font-family: 'Arial', sans-serif; /* Choose your preferred font */
+ font-size: 16px; /* Adjust the font size as needed */
+ outline: none; /* Remove default input outline */
+}
+
+/* Optional: Add some hover effect */
+input:hover {
+ border-color: #2980b9; /* Change border color on hover */
+}