[
  {
    "path": ".gitignore",
    "content": ".DS_Store\n12MegaBlog/.env\n"
  },
  {
    "path": ".vscode/settings.json",
    "content": "{\n    \"editor.acceptSuggestionOnEnter\": \"on\",\n    \"liveServer.settings.port\": 5501\n}"
  },
  {
    "path": "01basicreact/.gitignore",
    "content": "# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.\n\n# dependencies\n/node_modules\n/.pnp\n.pnp.js\n\n# testing\n/coverage\n\n# production\n/build\n\n# misc\n.DS_Store\n.env.local\n.env.development.local\n.env.test.local\n.env.production.local\n\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\n"
  },
  {
    "path": "01basicreact/README.md",
    "content": "# Getting Started with Create React App\n\nThis project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).\n\n## Available Scripts\n\nIn the project directory, you can run:\n\n### `npm start`\n\nRuns the app in the development mode.\\\nOpen [http://localhost:3000](http://localhost:3000) to view it in your browser.\n\nThe page will reload when you make changes.\\\nYou may also see any lint errors in the console.\n\n### `npm test`\n\nLaunches the test runner in the interactive watch mode.\\\nSee the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.\n\n### `npm run build`\n\nBuilds the app for production to the `build` folder.\\\nIt correctly bundles React in production mode and optimizes the build for the best performance.\n\nThe build is minified and the filenames include the hashes.\\\nYour app is ready to be deployed!\n\nSee the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.\n\n### `npm run eject`\n\n**Note: this is a one-way operation. Once you `eject`, you can't go back!**\n\nIf you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.\n\nInstead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own.\n\nYou don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it.\n\n## Learn More\n\nYou can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).\n\nTo learn React, check out the [React documentation](https://reactjs.org/).\n\n### Code Splitting\n\nThis section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)\n\n### Analyzing the Bundle Size\n\nThis section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)\n\n### Making a Progressive Web App\n\nThis section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)\n\n### Advanced Configuration\n\nThis section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)\n\n### Deployment\n\nThis section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)\n\n### `npm run build` fails to minify\n\nThis section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)\n"
  },
  {
    "path": "01basicreact/package.json",
    "content": "{\n  \"name\": \"01basicreact\",\n  \"version\": \"0.1.0\",\n  \"private\": true,\n  \"dependencies\": {\n    \"@testing-library/jest-dom\": \"^5.17.0\",\n    \"@testing-library/react\": \"^13.4.0\",\n    \"@testing-library/user-event\": \"^13.5.0\",\n    \"react\": \"^18.2.0\",\n    \"react-dom\": \"^18.2.0\",\n    \"react-scripts\": \"5.0.1\",\n    \"web-vitals\": \"^2.1.4\"\n  },\n  \"scripts\": {\n    \"start\": \"react-scripts start\",\n    \"build\": \"react-scripts build\",\n    \"test\": \"react-scripts test\",\n    \"eject\": \"react-scripts eject\"\n  },\n  \"eslintConfig\": {\n    \"extends\": [\n      \"react-app\",\n      \"react-app/jest\"\n    ]\n  },\n  \"browserslist\": {\n    \"production\": [\n      \">0.2%\",\n      \"not dead\",\n      \"not op_mini all\"\n    ],\n    \"development\": [\n      \"last 1 chrome version\",\n      \"last 1 firefox version\",\n      \"last 1 safari version\"\n    ]\n  }\n}\n"
  },
  {
    "path": "01basicreact/public/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"utf-8\" />\n    <link rel=\"icon\" href=\"%PUBLIC_URL%/favicon.ico\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n    <meta name=\"theme-color\" content=\"#000000\" />\n    <meta\n      name=\"description\"\n      content=\"Web site created using create-react-app\"\n    />\n    <link rel=\"apple-touch-icon\" href=\"%PUBLIC_URL%/logo192.png\" />\n    \n    <link rel=\"manifest\" href=\"%PUBLIC_URL%/manifest.json\" />\n    \n    <title>React App</title>\n  </head>\n  <body>\n    <noscript>You need to enable JavaScript to run this app.</noscript>\n    <div id=\"root\"></div>\n    \n  </body>\n</html>\n"
  },
  {
    "path": "01basicreact/public/manifest.json",
    "content": "{\n  \"short_name\": \"React App\",\n  \"name\": \"Create React App Sample\",\n  \"icons\": [\n    {\n      \"src\": \"favicon.ico\",\n      \"sizes\": \"64x64 32x32 24x24 16x16\",\n      \"type\": \"image/x-icon\"\n    },\n    {\n      \"src\": \"logo192.png\",\n      \"type\": \"image/png\",\n      \"sizes\": \"192x192\"\n    },\n    {\n      \"src\": \"logo512.png\",\n      \"type\": \"image/png\",\n      \"sizes\": \"512x512\"\n    }\n  ],\n  \"start_url\": \".\",\n  \"display\": \"standalone\",\n  \"theme_color\": \"#000000\",\n  \"background_color\": \"#ffffff\"\n}\n"
  },
  {
    "path": "01basicreact/public/robots.txt",
    "content": "# https://www.robotstxt.org/robotstxt.html\nUser-agent: *\nDisallow:\n"
  },
  {
    "path": "01basicreact/src/App.js",
    "content": "\nimport Chai from \"./Chai\";\n\nfunction App() {\n  return (\n    <>\n    <Chai/>\n    \n    </>\n  );\n}\n\nexport default App;\n"
  },
  {
    "path": "01basicreact/src/Chai.jsx",
    "content": "function Chai(){\n    return(\n        <h2>chai in react</h2>\n    )\n}\n\nexport default Chai"
  },
  {
    "path": "01basicreact/src/index.js",
    "content": "import React from 'react';\nimport ReactDOM from 'react-dom/client';\n\nimport App from './App';\n\n\nconst root = ReactDOM.createRoot(document.getElementById('root'));\nroot.render(\n \n    <App />\n  \n);\n"
  },
  {
    "path": "01vitereact/.eslintrc.cjs",
    "content": "module.exports = {\n  root: true,\n  env: { browser: true, es2020: true },\n  extends: [\n    'eslint:recommended',\n    'plugin:react/recommended',\n    'plugin:react/jsx-runtime',\n    'plugin:react-hooks/recommended',\n  ],\n  ignorePatterns: ['dist', '.eslintrc.cjs'],\n  parserOptions: { ecmaVersion: 'latest', sourceType: 'module' },\n  settings: { react: { version: '18.2' } },\n  plugins: ['react-refresh'],\n  rules: {\n    'react-refresh/only-export-components': [\n      'warn',\n      { allowConstantExport: true },\n    ],\n  },\n}\n"
  },
  {
    "path": "01vitereact/.gitignore",
    "content": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npnpm-debug.log*\nlerna-debug.log*\n\nnode_modules\ndist\ndist-ssr\n*.local\n\n# Editor directories and files\n.vscode/*\n!.vscode/extensions.json\n.idea\n.DS_Store\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n*.sw?\n"
  },
  {
    "path": "01vitereact/README.md",
    "content": "# React + Vite\n\nThis template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.\n\nCurrently, two official plugins are available:\n\n- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh\n- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh\n"
  },
  {
    "path": "01vitereact/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <link rel=\"icon\" type=\"image/svg+xml\" href=\"/vite.svg\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite + React</title>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.jsx\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "01vitereact/package.json",
    "content": "{\n  \"name\": \"01vitereact\",\n  \"private\": true,\n  \"version\": \"0.0.0\",\n  \"type\": \"module\",\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"lint\": \"eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0\",\n    \"preview\": \"vite preview\"\n  },\n  \"dependencies\": {\n    \"react\": \"^18.2.0\",\n    \"react-dom\": \"^18.2.0\"\n  },\n  \"devDependencies\": {\n    \"@types/react\": \"^18.2.15\",\n    \"@types/react-dom\": \"^18.2.7\",\n    \"@vitejs/plugin-react\": \"^4.0.3\",\n    \"eslint\": \"^8.45.0\",\n    \"eslint-plugin-react\": \"^7.32.2\",\n    \"eslint-plugin-react-hooks\": \"^4.6.0\",\n    \"eslint-plugin-react-refresh\": \"^0.4.3\",\n    \"vite\": \"^4.4.5\"\n  }\n}\n"
  },
  {
    "path": "01vitereact/src/App.jsx",
    "content": "\n\nimport Chai from \"./chai\"\n\n\nfunction App() {\n  const username = \"chai aur code\"\n\n  return (\n    <>\n    <Chai/>\n    <h1>chai aur react {username}</h1>\n    <p>test para</p>\n   </>\n  )\n}\n\nexport default App\n"
  },
  {
    "path": "01vitereact/src/chai.jsx",
    "content": "function Chai(){\n    return(\n        <h3>chai is ready</h3>\n    )\n}\n\nexport default Chai"
  },
  {
    "path": "01vitereact/src/main.jsx",
    "content": "import React from 'react'\nimport ReactDOM from 'react-dom/client'\n\nimport App from './App.jsx'\n\nfunction MyApp(){\n    return (\n        <div>\n            <h1>Custom App | chai</h1>\n        </div>\n    )\n}\n\n// const ReactElement = {\n//     type: 'a',\n//     props: {\n//         href: 'https://google.com',\n//         target: '_blank'\n//     },\n//     children: 'Click me to visit google'\n// }\n\nconst anotherElement = (\n    <a href=\"https://google.com\" target='_blank'>Visit google</a>\n)\n\n\n\nconst anotherUser = \"chai aur react\"\n\nconst reactElement = React.createElement(\n    'a',\n    {href: 'https://google.com',target: '_blank' },\n    'click me to visit google',\n    anotherElement\n)\n\nReactDOM.createRoot(document.getElementById('root')).render(\n \n    reactElement\n  \n)\n\n\n"
  },
  {
    "path": "01vitereact/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport react from '@vitejs/plugin-react'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [react()],\n})\n"
  },
  {
    "path": "02counter/.eslintrc.cjs",
    "content": "module.exports = {\n  root: true,\n  env: { browser: true, es2020: true },\n  extends: [\n    'eslint:recommended',\n    'plugin:react/recommended',\n    'plugin:react/jsx-runtime',\n    'plugin:react-hooks/recommended',\n  ],\n  ignorePatterns: ['dist', '.eslintrc.cjs'],\n  parserOptions: { ecmaVersion: 'latest', sourceType: 'module' },\n  settings: { react: { version: '18.2' } },\n  plugins: ['react-refresh'],\n  rules: {\n    'react-refresh/only-export-components': [\n      'warn',\n      { allowConstantExport: true },\n    ],\n  },\n}\n"
  },
  {
    "path": "02counter/.gitignore",
    "content": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npnpm-debug.log*\nlerna-debug.log*\n\nnode_modules\ndist\ndist-ssr\n*.local\n\n# Editor directories and files\n.vscode/*\n!.vscode/extensions.json\n.idea\n.DS_Store\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n*.sw?\n"
  },
  {
    "path": "02counter/README.md",
    "content": "# React + Vite\n\nThis template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.\n\nCurrently, two official plugins are available:\n\n- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh\n- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh\n"
  },
  {
    "path": "02counter/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <link rel=\"icon\" type=\"image/svg+xml\" href=\"/vite.svg\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite + React</title>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.jsx\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "02counter/package.json",
    "content": "{\n  \"name\": \"02counter\",\n  \"private\": true,\n  \"version\": \"0.0.0\",\n  \"type\": \"module\",\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"lint\": \"eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0\",\n    \"preview\": \"vite preview\"\n  },\n  \"dependencies\": {\n    \"react\": \"^18.2.0\",\n    \"react-dom\": \"^18.2.0\"\n  },\n  \"devDependencies\": {\n    \"@types/react\": \"^18.2.15\",\n    \"@types/react-dom\": \"^18.2.7\",\n    \"@vitejs/plugin-react\": \"^4.0.3\",\n    \"eslint\": \"^8.45.0\",\n    \"eslint-plugin-react\": \"^7.32.2\",\n    \"eslint-plugin-react-hooks\": \"^4.6.0\",\n    \"eslint-plugin-react-refresh\": \"^0.4.3\",\n    \"vite\": \"^4.4.5\"\n  }\n}\n"
  },
  {
    "path": "02counter/src/App.css",
    "content": "#root {\n  max-width: 1280px;\n  margin: 0 auto;\n  padding: 2rem;\n  text-align: center;\n}\n\n.logo {\n  height: 6em;\n  padding: 1.5em;\n  will-change: filter;\n  transition: filter 300ms;\n}\n.logo:hover {\n  filter: drop-shadow(0 0 2em #646cffaa);\n}\n.logo.react:hover {\n  filter: drop-shadow(0 0 2em #61dafbaa);\n}\n\n@keyframes logo-spin {\n  from {\n    transform: rotate(0deg);\n  }\n  to {\n    transform: rotate(360deg);\n  }\n}\n\n@media (prefers-reduced-motion: no-preference) {\n  a:nth-of-type(2) .logo {\n    animation: logo-spin infinite 20s linear;\n  }\n}\n\n.card {\n  padding: 2em;\n}\n\n.read-the-docs {\n  color: #888;\n}\n"
  },
  {
    "path": "02counter/src/App.jsx",
    "content": "import { useState } from 'react'\nimport reactLogo from './assets/react.svg'\nimport viteLogo from '/vite.svg'\nimport './App.css'\n\nfunction App() {\n\n  const [counter, setCounter]  = useState(15)\n\n  //let counter = 15\n\n  const addValue = () => {\n    //counter = counter + 1\n    setCounter(prevCounter => prevCounter + 1)\n    setCounter(prevCounter => prevCounter + 1 )\n    setCounter(prevCounter => prevCounter + 1)\n    setCounter(prevCounter => prevCounter + 1)\n    \n  }\n\n  const removeValue = () => {\n    setCounter(counter - 1)\n  }\n  \n  return (\n    <>\n      <h1>Chai aur react</h1>\n      <h2>Counter value: {counter}</h2>\n\n      <button\n      onClick={addValue}\n      >Add value {counter}</button> \n      <br />\n      <button\n      onClick={removeValue}\n      >remove value {counter}</button>\n      <p>footer: {counter}</p>\n    </>\n  )\n}\n\nexport default App\n"
  },
  {
    "path": "02counter/src/index.css",
    "content": ":root {\n  font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;\n  line-height: 1.5;\n  font-weight: 400;\n\n  color-scheme: light dark;\n  color: rgba(255, 255, 255, 0.87);\n  background-color: #242424;\n\n  font-synthesis: none;\n  text-rendering: optimizeLegibility;\n  -webkit-font-smoothing: antialiased;\n  -moz-osx-font-smoothing: grayscale;\n  -webkit-text-size-adjust: 100%;\n}\n\na {\n  font-weight: 500;\n  color: #646cff;\n  text-decoration: inherit;\n}\na:hover {\n  color: #535bf2;\n}\n\nbody {\n  margin: 0;\n  display: flex;\n  place-items: center;\n  min-width: 320px;\n  min-height: 100vh;\n}\n\nh1 {\n  font-size: 3.2em;\n  line-height: 1.1;\n}\n\nbutton {\n  border-radius: 8px;\n  border: 1px solid transparent;\n  padding: 0.6em 1.2em;\n  font-size: 1em;\n  font-weight: 500;\n  font-family: inherit;\n  background-color: #1a1a1a;\n  cursor: pointer;\n  transition: border-color 0.25s;\n}\nbutton:hover {\n  border-color: #646cff;\n}\nbutton:focus,\nbutton:focus-visible {\n  outline: 4px auto -webkit-focus-ring-color;\n}\n\n@media (prefers-color-scheme: light) {\n  :root {\n    color: #213547;\n    background-color: #ffffff;\n  }\n  a:hover {\n    color: #747bff;\n  }\n  button {\n    background-color: #f9f9f9;\n  }\n}\n"
  },
  {
    "path": "02counter/src/main.jsx",
    "content": "import React from 'react'\nimport ReactDOM from 'react-dom/client'\nimport App from './App.jsx'\nimport './index.css'\n\nReactDOM.createRoot(document.getElementById('root')).render(\n  <React.StrictMode>\n    <App />\n  </React.StrictMode>,\n)\n"
  },
  {
    "path": "02counter/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport react from '@vitejs/plugin-react'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [react()],\n})\n"
  },
  {
    "path": "03tailwindprops/.eslintrc.cjs",
    "content": "module.exports = {\n  root: true,\n  env: { browser: true, es2020: true },\n  extends: [\n    'eslint:recommended',\n    'plugin:react/recommended',\n    'plugin:react/jsx-runtime',\n    'plugin:react-hooks/recommended',\n  ],\n  ignorePatterns: ['dist', '.eslintrc.cjs'],\n  parserOptions: { ecmaVersion: 'latest', sourceType: 'module' },\n  settings: { react: { version: '18.2' } },\n  plugins: ['react-refresh'],\n  rules: {\n    'react-refresh/only-export-components': [\n      'warn',\n      { allowConstantExport: true },\n    ],\n  },\n}\n"
  },
  {
    "path": "03tailwindprops/.gitignore",
    "content": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npnpm-debug.log*\nlerna-debug.log*\n\nnode_modules\ndist\ndist-ssr\n*.local\n\n# Editor directories and files\n.vscode/*\n!.vscode/extensions.json\n.idea\n.DS_Store\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n*.sw?\n"
  },
  {
    "path": "03tailwindprops/README.md",
    "content": "# React + Vite\n\nThis template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.\n\nCurrently, two official plugins are available:\n\n- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh\n- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh\n"
  },
  {
    "path": "03tailwindprops/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <link rel=\"icon\" type=\"image/svg+xml\" href=\"/vite.svg\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite + React</title>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.jsx\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "03tailwindprops/package.json",
    "content": "{\n  \"name\": \"03tailwindprops\",\n  \"private\": true,\n  \"version\": \"0.0.0\",\n  \"type\": \"module\",\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"lint\": \"eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0\",\n    \"preview\": \"vite preview\"\n  },\n  \"dependencies\": {\n    \"react\": \"^18.2.0\",\n    \"react-dom\": \"^18.2.0\"\n  },\n  \"devDependencies\": {\n    \"@types/react\": \"^18.2.15\",\n    \"@types/react-dom\": \"^18.2.7\",\n    \"@vitejs/plugin-react\": \"^4.0.3\",\n    \"autoprefixer\": \"^10.4.15\",\n    \"eslint\": \"^8.45.0\",\n    \"eslint-plugin-react\": \"^7.32.2\",\n    \"eslint-plugin-react-hooks\": \"^4.6.0\",\n    \"eslint-plugin-react-refresh\": \"^0.4.3\",\n    \"postcss\": \"^8.4.28\",\n    \"tailwindcss\": \"^3.3.3\",\n    \"vite\": \"^4.4.5\"\n  }\n}\n"
  },
  {
    "path": "03tailwindprops/postcss.config.js",
    "content": "export default {\n  plugins: {\n    tailwindcss: {},\n    autoprefixer: {},\n  },\n}\n"
  },
  {
    "path": "03tailwindprops/src/App.css",
    "content": "#root {\n  max-width: 1280px;\n  margin: 0 auto;\n  padding: 2rem;\n  text-align: center;\n}\n\n.logo {\n  height: 6em;\n  padding: 1.5em;\n  will-change: filter;\n  transition: filter 300ms;\n}\n.logo:hover {\n  filter: drop-shadow(0 0 2em #646cffaa);\n}\n.logo.react:hover {\n  filter: drop-shadow(0 0 2em #61dafbaa);\n}\n\n@keyframes logo-spin {\n  from {\n    transform: rotate(0deg);\n  }\n  to {\n    transform: rotate(360deg);\n  }\n}\n\n@media (prefers-reduced-motion: no-preference) {\n  a:nth-of-type(2) .logo {\n    animation: logo-spin infinite 20s linear;\n  }\n}\n\n.card {\n  padding: 2em;\n}\n\n.read-the-docs {\n  color: #888;\n}\n"
  },
  {
    "path": "03tailwindprops/src/App.jsx",
    "content": "import { useState } from 'react'\nimport reactLogo from './assets/react.svg'\nimport viteLogo from '/vite.svg'\nimport './App.css'\nimport Card from './components/Card'\n\nfunction App() {\n  const [count, setCount] = useState(0)\n  let myObj = {\n    username: \"hitesh\",\n    age: 21\n  }\n  let newArr = [1, 2, 3]\n\n  return (\n    <>\n      <h1 className='bg-green-400 text-black p-4 rounded-xl mb-4'>Tailwind test</h1>\n      <Card username=\"chaiaurcode\" btnText=\"click me\" />\n      <Card username=\"hitesh\" />\n    </>\n  )\n}\n\nexport default App\n"
  },
  {
    "path": "03tailwindprops/src/components/Card.jsx",
    "content": "import React from 'react'\n\nfunction Card({username, btnText=\"visit me\"}) {\n    console.log(username);\n  return (\n    <div className=\"relative h-[400px] w-[300px] rounded-md \">\n  <img\n    src=\"https://images.unsplash.com/photo-1546961329-78bef0414d7c?ixlib=rb-4.0.3&amp;ixid=MnwxMjA3fDB8MHxzZWFyY2h8MTB8fHVzZXJ8ZW58MHx8MHx8&amp;auto=format&amp;fit=crop&amp;w=800&amp;q=60\"\n    alt=\"AirMax Pro\"\n    className=\"z-0 h-full w-full rounded-md object-cover\"\n  />\n  <div className=\"absolute inset-0 bg-gradient-to-t from-gray-900 to-transparent\"></div>\n  <div className=\"absolute bottom-4 left-4 text-left\">\n    <h1 className=\"text-lg font-semibold text-white\">{username}</h1>\n    <p className=\"mt-2 text-sm text-gray-300\">\n      Lorem ipsum dolor sit amet consectetur adipisicing elit. Excepturi,\n      debitis?\n    </p>\n    <button className=\"mt-2 inline-flex cursor-pointer items-center text-sm font-semibold text-white\">\n      {btnText } →\n    </button>\n  </div>\n</div>\n  )\n}\n\nexport default Card"
  },
  {
    "path": "03tailwindprops/src/index.css",
    "content": "@tailwind base;\n@tailwind components;\n@tailwind utilities;\n\n:root {\n  font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;\n  line-height: 1.5;\n  font-weight: 400;\n\n  color-scheme: light dark;\n  color: rgba(255, 255, 255, 0.87);\n  background-color: #242424;\n\n  font-synthesis: none;\n  text-rendering: optimizeLegibility;\n  -webkit-font-smoothing: antialiased;\n  -moz-osx-font-smoothing: grayscale;\n  -webkit-text-size-adjust: 100%;\n}\n\na {\n  font-weight: 500;\n  color: #646cff;\n  text-decoration: inherit;\n}\na:hover {\n  color: #535bf2;\n}\n\nbody {\n  margin: 0;\n  display: flex;\n  place-items: center;\n  min-width: 320px;\n  min-height: 100vh;\n}\n\nh1 {\n  font-size: 3.2em;\n  line-height: 1.1;\n}\n\nbutton {\n  border-radius: 8px;\n  border: 1px solid transparent;\n  padding: 0.6em 1.2em;\n  font-size: 1em;\n  font-weight: 500;\n  font-family: inherit;\n  background-color: #1a1a1a;\n  cursor: pointer;\n  transition: border-color 0.25s;\n}\nbutton:hover {\n  border-color: #646cff;\n}\nbutton:focus,\nbutton:focus-visible {\n  outline: 4px auto -webkit-focus-ring-color;\n}\n\n@media (prefers-color-scheme: light) {\n  :root {\n    color: #213547;\n    background-color: #ffffff;\n  }\n  a:hover {\n    color: #747bff;\n  }\n  button {\n    background-color: #f9f9f9;\n  }\n}\n"
  },
  {
    "path": "03tailwindprops/src/main.jsx",
    "content": "import React from 'react'\nimport ReactDOM from 'react-dom/client'\nimport App from './App.jsx'\nimport './index.css'\n\nReactDOM.createRoot(document.getElementById('root')).render(\n  <React.StrictMode>\n    <App />\n  </React.StrictMode>,\n)\n"
  },
  {
    "path": "03tailwindprops/tailwind.config.js",
    "content": "/** @type {import('tailwindcss').Config} */\nexport default {\n  content: [\n    \"./index.html\",\n    \"./src/**/*.{js,ts,jsx,tsx}\",\n  ],\n  theme: {\n    extend: {},\n  },\n  plugins: [],\n}\n\n"
  },
  {
    "path": "03tailwindprops/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport react from '@vitejs/plugin-react'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [react()],\n})\n"
  },
  {
    "path": "04bgChanger/.eslintrc.cjs",
    "content": "module.exports = {\n  root: true,\n  env: { browser: true, es2020: true },\n  extends: [\n    'eslint:recommended',\n    'plugin:react/recommended',\n    'plugin:react/jsx-runtime',\n    'plugin:react-hooks/recommended',\n  ],\n  ignorePatterns: ['dist', '.eslintrc.cjs'],\n  parserOptions: { ecmaVersion: 'latest', sourceType: 'module' },\n  settings: { react: { version: '18.2' } },\n  plugins: ['react-refresh'],\n  rules: {\n    'react-refresh/only-export-components': [\n      'warn',\n      { allowConstantExport: true },\n    ],\n  },\n}\n"
  },
  {
    "path": "04bgChanger/.gitignore",
    "content": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npnpm-debug.log*\nlerna-debug.log*\n\nnode_modules\ndist\ndist-ssr\n*.local\n\n# Editor directories and files\n.vscode/*\n!.vscode/extensions.json\n.idea\n.DS_Store\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n*.sw?\n"
  },
  {
    "path": "04bgChanger/README.md",
    "content": "# React + Vite\n\nThis template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.\n\nCurrently, two official plugins are available:\n\n- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh\n- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh\n"
  },
  {
    "path": "04bgChanger/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <link rel=\"icon\" type=\"image/svg+xml\" href=\"/vite.svg\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite + React</title>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.jsx\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "04bgChanger/package.json",
    "content": "{\n  \"name\": \"04bgchanger\",\n  \"private\": true,\n  \"version\": \"0.0.0\",\n  \"type\": \"module\",\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"lint\": \"eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0\",\n    \"preview\": \"vite preview\"\n  },\n  \"dependencies\": {\n    \"react\": \"^18.2.0\",\n    \"react-dom\": \"^18.2.0\"\n  },\n  \"devDependencies\": {\n    \"@types/react\": \"^18.2.15\",\n    \"@types/react-dom\": \"^18.2.7\",\n    \"@vitejs/plugin-react\": \"^4.0.3\",\n    \"autoprefixer\": \"^10.4.15\",\n    \"eslint\": \"^8.45.0\",\n    \"eslint-plugin-react\": \"^7.32.2\",\n    \"eslint-plugin-react-hooks\": \"^4.6.0\",\n    \"eslint-plugin-react-refresh\": \"^0.4.3\",\n    \"postcss\": \"^8.4.28\",\n    \"tailwindcss\": \"^3.3.3\",\n    \"vite\": \"^4.4.5\"\n  }\n}\n"
  },
  {
    "path": "04bgChanger/postcss.config.js",
    "content": "export default {\n  plugins: {\n    tailwindcss: {},\n    autoprefixer: {},\n  },\n}\n"
  },
  {
    "path": "04bgChanger/src/App.css",
    "content": "#root {\n  max-width: 1280px;\n  margin: 0 auto;\n  padding: 2rem;\n  text-align: center;\n}\n\n.logo {\n  height: 6em;\n  padding: 1.5em;\n  will-change: filter;\n  transition: filter 300ms;\n}\n.logo:hover {\n  filter: drop-shadow(0 0 2em #646cffaa);\n}\n.logo.react:hover {\n  filter: drop-shadow(0 0 2em #61dafbaa);\n}\n\n@keyframes logo-spin {\n  from {\n    transform: rotate(0deg);\n  }\n  to {\n    transform: rotate(360deg);\n  }\n}\n\n@media (prefers-reduced-motion: no-preference) {\n  a:nth-of-type(2) .logo {\n    animation: logo-spin infinite 20s linear;\n  }\n}\n\n.card {\n  padding: 2em;\n}\n\n.read-the-docs {\n  color: #888;\n}\n"
  },
  {
    "path": "04bgChanger/src/App.jsx",
    "content": "import { useState } from \"react\"\n\n\nfunction App() {\n  const [color, setColor] = useState(\"olive\")\n\n  return (\n    <div className=\"w-full h-screen duration-200\"\n    style={{backgroundColor: color}}\n    >\n      <div className=\"fixed flex flex-wrap justify-center bottom-12 inset-x-0 px-2\">\n        <div className=\"flex flex-wrap justify-center gap-3 shadow-lg bg-white px-3 py-2 rounded-3xl\">\n          <button\n          onClick={() => setColor(\"red\")}\n          className=\"outline-none px-4 py-1 rounded-full text-white shadow-lg\"\n          style={{backgroundColor: \"red\"}}\n          >Red</button>\n          <button\n          onClick={() => setColor(\"green\")}\n          className=\"outline-none px-4 py-1 rounded-full text-white shadow-lg\"\n          style={{backgroundColor: \"green\"}}\n          >Green</button>\n          <button\n          onClick={() => setColor(\"blue\")}\n          className=\"outline-none px-4 py-1 rounded-full text-white shadow-lg\"\n          style={{backgroundColor: \"blue\"}}\n          >Blue</button>\n        </div>\n      </div>\n    </div>\n  )\n}\n\nexport default App\n"
  },
  {
    "path": "04bgChanger/src/index.css",
    "content": "@tailwind base;\n@tailwind components;\n@tailwind utilities;\n"
  },
  {
    "path": "04bgChanger/src/main.jsx",
    "content": "import React from 'react'\nimport ReactDOM from 'react-dom/client'\nimport App from './App.jsx'\nimport './index.css'\n\nReactDOM.createRoot(document.getElementById('root')).render(\n  <React.StrictMode>\n    <App />\n  </React.StrictMode>,\n)\n"
  },
  {
    "path": "04bgChanger/tailwind.config.js",
    "content": "/** @type {import('tailwindcss').Config} */\nexport default {\n  content: [\n    \"./index.html\",\n    \"./src/**/*.{js,ts,jsx,tsx}\",\n  ],\n  theme: {\n    extend: {},\n  },\n  plugins: [],\n}\n\n"
  },
  {
    "path": "04bgChanger/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport react from '@vitejs/plugin-react'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [react()],\n})\n"
  },
  {
    "path": "05passwordGenerator/.eslintrc.cjs",
    "content": "module.exports = {\n  root: true,\n  env: { browser: true, es2020: true },\n  extends: [\n    'eslint:recommended',\n    'plugin:react/recommended',\n    'plugin:react/jsx-runtime',\n    'plugin:react-hooks/recommended',\n  ],\n  ignorePatterns: ['dist', '.eslintrc.cjs'],\n  parserOptions: { ecmaVersion: 'latest', sourceType: 'module' },\n  settings: { react: { version: '18.2' } },\n  plugins: ['react-refresh'],\n  rules: {\n    'react-refresh/only-export-components': [\n      'warn',\n      { allowConstantExport: true },\n    ],\n  },\n}\n"
  },
  {
    "path": "05passwordGenerator/.gitignore",
    "content": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npnpm-debug.log*\nlerna-debug.log*\n\nnode_modules\ndist\ndist-ssr\n*.local\n\n# Editor directories and files\n.vscode/*\n!.vscode/extensions.json\n.idea\n.DS_Store\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n*.sw?\n"
  },
  {
    "path": "05passwordGenerator/README.md",
    "content": "# React + Vite\n\nThis template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.\n\nCurrently, two official plugins are available:\n\n- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh\n- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh\n"
  },
  {
    "path": "05passwordGenerator/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <link rel=\"icon\" type=\"image/svg+xml\" href=\"/vite.svg\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite + React</title>\n  </head>\n  <body style=\"background-color: #000;\">\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.jsx\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "05passwordGenerator/package.json",
    "content": "{\n  \"name\": \"05passwordgenerator\",\n  \"private\": true,\n  \"version\": \"0.0.0\",\n  \"type\": \"module\",\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"lint\": \"eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0\",\n    \"preview\": \"vite preview\"\n  },\n  \"dependencies\": {\n    \"react\": \"^18.2.0\",\n    \"react-dom\": \"^18.2.0\"\n  },\n  \"devDependencies\": {\n    \"@types/react\": \"^18.2.15\",\n    \"@types/react-dom\": \"^18.2.7\",\n    \"@vitejs/plugin-react\": \"^4.0.3\",\n    \"autoprefixer\": \"^10.4.15\",\n    \"eslint\": \"^8.45.0\",\n    \"eslint-plugin-react\": \"^7.32.2\",\n    \"eslint-plugin-react-hooks\": \"^4.6.0\",\n    \"eslint-plugin-react-refresh\": \"^0.4.3\",\n    \"postcss\": \"^8.4.28\",\n    \"tailwindcss\": \"^3.3.3\",\n    \"vite\": \"^4.4.5\"\n  }\n}\n"
  },
  {
    "path": "05passwordGenerator/postcss.config.js",
    "content": "export default {\n  plugins: {\n    tailwindcss: {},\n    autoprefixer: {},\n  },\n}\n"
  },
  {
    "path": "05passwordGenerator/src/App.css",
    "content": ""
  },
  {
    "path": "05passwordGenerator/src/App.jsx",
    "content": "import { useState, useCallback, useEffect, useRef } from 'react'\n\n\n\nfunction App() {\n  const [length, setLength] = useState(8)\n  const [numberAllowed, setNumberAllowed] = useState(false);\n  const [charAllowed, setCharAllowed] = useState(false)\n  const [password, setPassword] = useState(\"\")\n\n  //useRef hook\n  const passwordRef = useRef(null)\n\n  const passwordGenerator = useCallback(() => {\n    let pass = \"\"\n    let str = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\"\n    if (numberAllowed) str += \"0123456789\"\n    if (charAllowed) str += \"!@#$%^&*-_+=[]{}~`\"\n\n    for (let i = 1; i <= length; i++) {\n      let char = Math.floor(Math.random() * str.length + 1)\n      pass += str.charAt(char)\n      \n    }\n\n    setPassword(pass)\n\n\n  }, [length, numberAllowed, charAllowed, setPassword])\n\n  const copyPasswordToClipboard = useCallback(() => {\n    passwordRef.current?.select();\n    passwordRef.current?.setSelectionRange(0, 999);\n    window.navigator.clipboard.writeText(password)\n  }, [password])\n\n  useEffect(() => {\n    passwordGenerator()\n  }, [length, numberAllowed, charAllowed, passwordGenerator])\n  return (\n    \n    <div className=\"w-full max-w-md mx-auto shadow-md rounded-lg px-4 py-3 my-8 bg-gray-800 text-orange-500\">\n      <h1 className='text-white text-center my-3'>Password generator</h1>\n    <div className=\"flex shadow rounded-lg overflow-hidden mb-4\">\n        <input\n            type=\"text\"\n            value={password}\n            className=\"outline-none w-full py-1 px-3\"\n            placeholder=\"Password\"\n            readOnly\n            ref={passwordRef}\n        />\n        <button\n        onClick={copyPasswordToClipboard}\n        className='outline-none bg-blue-700 text-white px-3 py-0.5 shrink-0'\n        >copy</button>\n        \n    </div>\n    <div className='flex text-sm gap-x-2'>\n      <div className='flex items-center gap-x-1'>\n        <input \n        type=\"range\"\n        min={6}\n        max={100}\n        value={length}\n         className='cursor-pointer'\n         onChange={(e) => {setLength(e.target.value)}}\n          />\n          <label>Length: {length}</label>\n      </div>\n      <div className=\"flex items-center gap-x-1\">\n      <input\n          type=\"checkbox\"\n          defaultChecked={numberAllowed}\n          id=\"numberInput\"\n          onChange={() => {\n              setNumberAllowed((prev) => !prev);\n          }}\n      />\n      <label htmlFor=\"numberInput\">Numbers</label>\n      </div>\n      <div className=\"flex items-center gap-x-1\">\n          <input\n              type=\"checkbox\"\n              defaultChecked={charAllowed}\n              id=\"characterInput\"\n              onChange={() => {\n                  setCharAllowed((prev) => !prev )\n              }}\n          />\n          <label htmlFor=\"characterInput\">Characters</label>\n      </div>\n    </div>\n</div>\n    \n  )\n}\n\nexport default App\n"
  },
  {
    "path": "05passwordGenerator/src/index.css",
    "content": "@tailwind base;\n@tailwind components;\n@tailwind utilities;"
  },
  {
    "path": "05passwordGenerator/src/main.jsx",
    "content": "import React from 'react'\nimport ReactDOM from 'react-dom/client'\nimport App from './App.jsx'\nimport './index.css'\n\nReactDOM.createRoot(document.getElementById('root')).render(\n  <React.StrictMode>\n    <App />\n  </React.StrictMode>,\n)\n"
  },
  {
    "path": "05passwordGenerator/tailwind.config.js",
    "content": "/** @type {import('tailwindcss').Config} */\nexport default {\n  content: [\n    \"./index.html\",\n    \"./src/**/*.{js,ts,jsx,tsx}\",\n  ],\n  theme: {\n    extend: {},\n  },\n  plugins: [],\n}\n\n"
  },
  {
    "path": "05passwordGenerator/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport react from '@vitejs/plugin-react'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [react()],\n})\n"
  },
  {
    "path": "06currencyConvertor/.eslintrc.cjs",
    "content": "module.exports = {\n  root: true,\n  env: { browser: true, es2020: true },\n  extends: [\n    'eslint:recommended',\n    'plugin:react/recommended',\n    'plugin:react/jsx-runtime',\n    'plugin:react-hooks/recommended',\n  ],\n  ignorePatterns: ['dist', '.eslintrc.cjs'],\n  parserOptions: { ecmaVersion: 'latest', sourceType: 'module' },\n  settings: { react: { version: '18.2' } },\n  plugins: ['react-refresh'],\n  rules: {\n    'react-refresh/only-export-components': [\n      'warn',\n      { allowConstantExport: true },\n    ],\n  },\n}\n"
  },
  {
    "path": "06currencyConvertor/.gitignore",
    "content": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npnpm-debug.log*\nlerna-debug.log*\n\nnode_modules\ndist\ndist-ssr\n*.local\n\n# Editor directories and files\n.vscode/*\n!.vscode/extensions.json\n.idea\n.DS_Store\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n*.sw?\n"
  },
  {
    "path": "06currencyConvertor/README.md",
    "content": "# React + Vite\n\nThis template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.\n\nCurrently, two official plugins are available:\n\n- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh\n- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh\n"
  },
  {
    "path": "06currencyConvertor/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <link rel=\"icon\" type=\"image/svg+xml\" href=\"/vite.svg\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite + React</title>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.jsx\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "06currencyConvertor/package.json",
    "content": "{\n  \"name\": \"06currencyconvertor\",\n  \"private\": true,\n  \"version\": \"0.0.0\",\n  \"type\": \"module\",\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"lint\": \"eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0\",\n    \"preview\": \"vite preview\"\n  },\n  \"dependencies\": {\n    \"react\": \"^18.2.0\",\n    \"react-dom\": \"^18.2.0\"\n  },\n  \"devDependencies\": {\n    \"@types/react\": \"^18.2.15\",\n    \"@types/react-dom\": \"^18.2.7\",\n    \"@vitejs/plugin-react\": \"^4.0.3\",\n    \"autoprefixer\": \"^10.4.15\",\n    \"eslint\": \"^8.45.0\",\n    \"eslint-plugin-react\": \"^7.32.2\",\n    \"eslint-plugin-react-hooks\": \"^4.6.0\",\n    \"eslint-plugin-react-refresh\": \"^0.4.3\",\n    \"postcss\": \"^8.4.29\",\n    \"tailwindcss\": \"^3.3.3\",\n    \"vite\": \"^4.4.5\"\n  }\n}\n"
  },
  {
    "path": "06currencyConvertor/postcss.config.js",
    "content": "export default {\n  plugins: {\n    tailwindcss: {},\n    autoprefixer: {},\n  },\n}\n"
  },
  {
    "path": "06currencyConvertor/src/App.css",
    "content": "#root {\n  max-width: 1280px;\n  margin: 0 auto;\n  padding: 2rem;\n  text-align: center;\n}\n\n.logo {\n  height: 6em;\n  padding: 1.5em;\n  will-change: filter;\n  transition: filter 300ms;\n}\n.logo:hover {\n  filter: drop-shadow(0 0 2em #646cffaa);\n}\n.logo.react:hover {\n  filter: drop-shadow(0 0 2em #61dafbaa);\n}\n\n@keyframes logo-spin {\n  from {\n    transform: rotate(0deg);\n  }\n  to {\n    transform: rotate(360deg);\n  }\n}\n\n@media (prefers-reduced-motion: no-preference) {\n  a:nth-of-type(2) .logo {\n    animation: logo-spin infinite 20s linear;\n  }\n}\n\n.card {\n  padding: 2em;\n}\n\n.read-the-docs {\n  color: #888;\n}\n"
  },
  {
    "path": "06currencyConvertor/src/App.jsx",
    "content": "import { useState } from 'react'\nimport {InputBox} from './components'\nimport useCurrencyInfo from './hooks/useCurrencyInfo'\n\n\nfunction App() {\n\n  const [amount, setAmount] = useState(0)\n  const [from, setFrom] = useState(\"usd\")\n  const [to, setTo] = useState(\"inr\")\n  const [convertedAmount, setConvertedAmount] = useState(0)\n\n  const currencyInfo = useCurrencyInfo(from)\n\n  const options = Object.keys(currencyInfo)\n\n  const swap = () => {\n    setFrom(to)\n    setTo(from)\n    setConvertedAmount(amount)\n    setAmount(convertedAmount)\n  }\n  \n  const convert = () => {\n    setConvertedAmount(amount * currencyInfo[to])\n  }\n\n  return (\n    <div\n        className=\"w-full h-screen flex flex-wrap justify-center items-center bg-cover bg-no-repeat\"\n        style={{\n            backgroundImage: `url('https://images.pexels.com/photos/3532540/pexels-photo-3532540.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=2')`,\n        }}\n    >\n        <div className=\"w-full\">\n            <div className=\"w-full max-w-md mx-auto border border-gray-60 rounded-lg p-5 backdrop-blur-sm bg-white/30\">\n                <form\n                    onSubmit={(e) => {\n                        e.preventDefault();\n                        convert()\n                       \n                    }}\n                >\n                    <div className=\"w-full mb-1\">\n                        <InputBox\n                            label=\"From\"\n                            amount={amount}\n                            currencyOptions={options}\n                            onCurrencyChange={(currency) => setAmount(amount)}\n                            selectCurrency={from}\n                            onAmountChange={(amount) => setAmount(amount)}\n                        />\n                    </div>\n                    <div className=\"relative w-full h-0.5\">\n                        <button\n                            type=\"button\"\n                            className=\"absolute left-1/2 -translate-x-1/2 -translate-y-1/2 border-2 border-white rounded-md bg-blue-600 text-white px-2 py-0.5\"\n                            onClick={swap}\n                        >\n                            swap\n                        </button>\n                    </div>\n                    <div className=\"w-full mt-1 mb-4\">\n                        <InputBox\n                            label=\"To\"\n                            amount={convertedAmount}\n                            currencyOptions={options}\n                            onCurrencyChange={(currency) => setTo(currency)}\n                            selectCurrency={from}\n                            amountDisable\n                        />\n                    </div>\n                    <button type=\"submit\" className=\"w-full bg-blue-600 text-white px-4 py-3 rounded-lg\">\n                        Convert {from.toUpperCase()} to {to.toUpperCase()}\n                    </button>\n                </form>\n            </div>\n        </div>\n    </div>\n);\n}\n\nexport default App\n"
  },
  {
    "path": "06currencyConvertor/src/components/InputBox.jsx",
    "content": "import React, {useId} from 'react'\n\nfunction InputBox({\n    label,\n    amount,\n    onAmountChange,\n    onCurrencyChange,\n    currencyOptions = [],\n    selectCurrency = \"usd\",\n    amountDisable = false,\n    currencyDisable = false,\n    className = \"\",\n}) {\n   const amountInputId = useId()\n\n    return (\n        <div className={`bg-white p-3 rounded-lg text-sm flex ${className}`}>\n            <div className=\"w-1/2\">\n                <label htmlFor={amountInputId}  className=\"text-black/40 mb-2 inline-block\">\n                    {label}\n                </label>\n                <input\n                    id={amountInputId}\n                    className=\"outline-none w-full bg-transparent py-1.5\"\n                    type=\"number\"\n                    placeholder=\"Amount\"\n                    disabled={amountDisable}\n                    value={amount}\n                    onChange={(e) => onAmountChange && onAmountChange(Number(e.target.value))}\n                />\n            </div>\n            <div className=\"w-1/2 flex flex-wrap justify-end text-right\">\n                <p className=\"text-black/40 mb-2 w-full\">Currency Type</p>\n                <select\n                    className=\"rounded-lg px-1 py-1 bg-gray-100 cursor-pointer outline-none\"\n                    value={selectCurrency}\n                    onChange={(e) => onCurrencyChange && onCurrencyChange(e.target.value)}\n                    disabled={currencyDisable}\n                >\n                    \n                        {currencyOptions.map((currency) => (\n                            <option key={currency} value={currency}>\n                            {currency}\n                            </option>\n                        ))}\n                \n                </select>\n            </div>\n        </div>\n    );\n}\n\nexport default InputBox;"
  },
  {
    "path": "06currencyConvertor/src/components/index.js",
    "content": "import InputBox from './InputBox'\n\nexport {InputBox}"
  },
  {
    "path": "06currencyConvertor/src/hooks/useCurrencyInfo.js",
    "content": "import {useEffect, useState} from \"react\"\n\n\nfunction useCurrencyInfo(currency){\n    const [data, setData] = useState({})\n    useEffect(() => {\n        fetch(`https://cdn.jsdelivr.net/gh/fawazahmed0/currency-api@1/latest/currencies/${currency}.json`)\n        .then((res) => res.json())\n        .then((res) => setData(res[currency]))\n        console.log(data);\n    }, [currency])\n    console.log(data);\n    return data\n}\n\nexport default useCurrencyInfo;"
  },
  {
    "path": "06currencyConvertor/src/index.css",
    "content": "@tailwind base;\n@tailwind components;\n@tailwind utilities;"
  },
  {
    "path": "06currencyConvertor/src/main.jsx",
    "content": "import React from 'react'\nimport ReactDOM from 'react-dom/client'\nimport App from './App.jsx'\nimport './index.css'\n\nReactDOM.createRoot(document.getElementById('root')).render(\n  <React.StrictMode>\n    <App />\n  </React.StrictMode>,\n)\n"
  },
  {
    "path": "06currencyConvertor/tailwind.config.js",
    "content": "/** @type {import('tailwindcss').Config} */\nexport default {\n  content: [\n    \"./index.html\",\n    \"./src/**/*.{js,ts,jsx,tsx}\",\n  ],\n  theme: {\n    extend: {},\n  },\n  plugins: [],\n}\n\n"
  },
  {
    "path": "06currencyConvertor/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport react from '@vitejs/plugin-react'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [react()],\n})\n"
  },
  {
    "path": "07reactRouter/.eslintrc.cjs",
    "content": "module.exports = {\n  root: true,\n  env: { browser: true, es2020: true },\n  extends: [\n    'eslint:recommended',\n    'plugin:react/recommended',\n    'plugin:react/jsx-runtime',\n    'plugin:react-hooks/recommended',\n  ],\n  ignorePatterns: ['dist', '.eslintrc.cjs'],\n  parserOptions: { ecmaVersion: 'latest', sourceType: 'module' },\n  settings: { react: { version: '18.2' } },\n  plugins: ['react-refresh'],\n  rules: {\n    'react-refresh/only-export-components': [\n      'warn',\n      { allowConstantExport: true },\n    ],\n  },\n}\n"
  },
  {
    "path": "07reactRouter/.gitignore",
    "content": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npnpm-debug.log*\nlerna-debug.log*\n\nnode_modules\ndist\ndist-ssr\n*.local\n\n# Editor directories and files\n.vscode/*\n!.vscode/extensions.json\n.idea\n.DS_Store\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n*.sw?\n"
  },
  {
    "path": "07reactRouter/README.md",
    "content": "# React + Vite\n\nThis template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.\n\nCurrently, two official plugins are available:\n\n- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh\n- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh\n"
  },
  {
    "path": "07reactRouter/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <link rel=\"icon\" type=\"image/svg+xml\" href=\"/vite.svg\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite + React</title>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.jsx\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "07reactRouter/package.json",
    "content": "{\n  \"name\": \"07reactrouter\",\n  \"private\": true,\n  \"version\": \"0.0.0\",\n  \"type\": \"module\",\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"lint\": \"eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0\",\n    \"preview\": \"vite preview\"\n  },\n  \"dependencies\": {\n    \"react\": \"^18.2.0\",\n    \"react-dom\": \"^18.2.0\",\n    \"react-router-dom\": \"^6.15.0\"\n  },\n  \"devDependencies\": {\n    \"@types/react\": \"^18.2.15\",\n    \"@types/react-dom\": \"^18.2.7\",\n    \"@vitejs/plugin-react\": \"^4.0.3\",\n    \"autoprefixer\": \"^10.4.15\",\n    \"eslint\": \"^8.45.0\",\n    \"eslint-plugin-react\": \"^7.32.2\",\n    \"eslint-plugin-react-hooks\": \"^4.6.0\",\n    \"eslint-plugin-react-refresh\": \"^0.4.3\",\n    \"postcss\": \"^8.4.29\",\n    \"tailwindcss\": \"^3.3.3\",\n    \"vite\": \"^4.4.5\"\n  }\n}\n"
  },
  {
    "path": "07reactRouter/postcss.config.js",
    "content": "export default {\n  plugins: {\n    tailwindcss: {},\n    autoprefixer: {},\n  },\n}\n"
  },
  {
    "path": "07reactRouter/src/App.css",
    "content": "#root {\n  max-width: 1280px;\n  margin: 0 auto;\n  padding: 2rem;\n  text-align: center;\n}\n\n.logo {\n  height: 6em;\n  padding: 1.5em;\n  will-change: filter;\n  transition: filter 300ms;\n}\n.logo:hover {\n  filter: drop-shadow(0 0 2em #646cffaa);\n}\n.logo.react:hover {\n  filter: drop-shadow(0 0 2em #61dafbaa);\n}\n\n@keyframes logo-spin {\n  from {\n    transform: rotate(0deg);\n  }\n  to {\n    transform: rotate(360deg);\n  }\n}\n\n@media (prefers-reduced-motion: no-preference) {\n  a:nth-of-type(2) .logo {\n    animation: logo-spin infinite 20s linear;\n  }\n}\n\n.card {\n  padding: 2em;\n}\n\n.read-the-docs {\n  color: #888;\n}\n"
  },
  {
    "path": "07reactRouter/src/App.jsx",
    "content": "import { useState } from 'react'\nimport reactLogo from './assets/react.svg'\nimport viteLogo from '/vite.svg'\nimport './App.css'\nimport Header from './components/Header/Header'\nimport Footer from './components/Footer/Footer'\nimport Home from './components/Home/Home'\n\nfunction App() {\n  const [count, setCount] = useState(0)\n\n  return (\n    <>\n     \n      \n    </>\n  )\n}\n\nexport default App\n"
  },
  {
    "path": "07reactRouter/src/Layout.jsx",
    "content": "import React from 'react'\nimport Header from './components/Header/Header'\nimport Footer from './components/Footer/Footer'\nimport { Outlet } from 'react-router-dom'\n\nfunction Layout() {\n  return (\n    <>\n    <Header/>\n    <Outlet />\n    <Footer />\n    </>\n  )\n}\n\nexport default Layout"
  },
  {
    "path": "07reactRouter/src/components/About/About.jsx",
    "content": "import React from 'react'\n\nexport default function About() {\n  return (\n      <div className=\"py-16 bg-white\">\n          <div className=\"container m-auto px-6 text-gray-600 md:px-12 xl:px-6\">\n              <div className=\"space-y-6 md:space-y-0 md:flex md:gap-6 lg:items-center lg:gap-12\">\n                  <div className=\"md:5/12 lg:w-5/12\">\n                      <img\n                          src=\"https://tailus.io/sources/blocks/left-image/preview/images/startup.png\"\n                          alt=\"image\"\n                      />\n                  </div>\n                  <div className=\"md:7/12 lg:w-6/12\">\n                      <h2 className=\"text-2xl text-gray-900 font-bold md:text-4xl\">\n                          React development is carried out by passionate developers\n                      </h2>\n                      <p className=\"mt-6 text-gray-600\">\n                          Lorem ipsum dolor, sit amet consectetur adipisicing elit. Eum omnis voluptatem\n                          accusantium nemo perspiciatis delectus atque autem! Voluptatum tenetur beatae unde\n                          aperiam, repellat expedita consequatur! Officiis id consequatur atque doloremque!\n                      </p>\n                      <p className=\"mt-4 text-gray-600\">\n                          Nobis minus voluptatibus pariatur dignissimos libero quaerat iure expedita at?\n                          Asperiores nemo possimus nesciunt dicta veniam aspernatur quam mollitia.\n                      </p>\n                  </div>\n              </div>\n          </div>\n      </div>\n  );\n}"
  },
  {
    "path": "07reactRouter/src/components/Contact/Contact.jsx",
    "content": "import React from 'react'\n\nexport default function Contact() {\n    return (\n        <div className=\"relative flex items-top justify-center min-h-[700px] bg-white sm:items-center sm:pt-0\">\n            <div className=\"max-w-6xl mx-auto sm:px-6 lg:px-8\">\n                <div className=\"mt-8 overflow-hidden\">\n                    <div className=\"grid grid-cols-1 md:grid-cols-2\">\n                        <div className=\"p-6 mr-2 bg-gray-100 sm:rounded-lg\">\n                            <h1 className=\"text-3xl sm:text-4xl text-gray-800 font-extrabold tracking-tight\">\n                                Get in touch: \n                            </h1>\n                            <p className=\"text-normal text-lg sm:text-xl font-medium text-gray-600 mt-2\">\n                                Fill in the form to start a conversation\n                            </p>\n\n                            <div className=\"flex items-center mt-8 text-gray-600\">\n                                <svg\n                                    fill=\"none\"\n                                    stroke=\"currentColor\"\n                                    stroke-linecap=\"round\"\n                                    stroke-linejoin=\"round\"\n                                    stroke-width=\"1.5\"\n                                    viewBox=\"0 0 24 24\"\n                                    className=\"w-8 h-8 text-gray-500\"\n                                >\n                                    <path\n                                        stroke-linecap=\"round\"\n                                        stroke-linejoin=\"round\"\n                                        stroke-width=\"1.5\"\n                                        d=\"M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z\"\n                                    />\n                                    <path\n                                        stroke-linecap=\"round\"\n                                        stroke-linejoin=\"round\"\n                                        stroke-width=\"1.5\"\n                                        d=\"M15 11a3 3 0 11-6 0 3 3 0 016 0z\"\n                                    />\n                                </svg>\n                                <div className=\"ml-4 text-md tracking-wide font-semibold w-40\">\n                                    Acme Inc, Street, State, Postal Code\n                                </div>\n                            </div>\n\n                            <div className=\"flex items-center mt-4 text-gray-600\">\n                                <svg\n                                    fill=\"none\"\n                                    stroke=\"currentColor\"\n                                    stroke-linecap=\"round\"\n                                    stroke-linejoin=\"round\"\n                                    stroke-width=\"1.5\"\n                                    viewBox=\"0 0 24 24\"\n                                    className=\"w-8 h-8 text-gray-500\"\n                                >\n                                    <path\n                                        stroke-linecap=\"round\"\n                                        stroke-linejoin=\"round\"\n                                        stroke-width=\"1.5\"\n                                        d=\"M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z\"\n                                    />\n                                </svg>\n                                <div className=\"ml-4 text-md tracking-wide font-semibold w-40\">\n                                    +44 1234567890\n                                </div>\n                            </div>\n\n                            <div className=\"flex items-center mt-2 text-gray-600\">\n                                <svg\n                                    fill=\"none\"\n                                    stroke=\"currentColor\"\n                                    stroke-linecap=\"round\"\n                                    stroke-linejoin=\"round\"\n                                    stroke-width=\"1.5\"\n                                    viewBox=\"0 0 24 24\"\n                                    className=\"w-8 h-8 text-gray-500\"\n                                >\n                                    <path\n                                        stroke-linecap=\"round\"\n                                        stroke-linejoin=\"round\"\n                                        stroke-width=\"1.5\"\n                                        d=\"M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z\"\n                                    />\n                                </svg>\n                                <div className=\"ml-4 text-md tracking-wide font-semibold w-40\">\n                                    info@acme.org\n                                </div>\n                            </div>\n                        </div>\n\n                        <form className=\"p-6 flex flex-col justify-center\">\n                            <div className=\"flex flex-col\">\n                                <label for=\"name\" className=\"hidden\">\n                                    Full Name\n                                </label>\n                                <input\n                                    type=\"name\"\n                                    name=\"name\"\n                                    id=\"name\"\n                                    placeholder=\"Full Name\"\n                                    className=\"w-100 mt-2 py-3 px-3 rounded-lg bg-white border border-gray-400 text-gray-800 font-semibold focus:border-orange-500 focus:outline-none\"\n                                />\n                            </div>\n\n                            <div className=\"flex flex-col mt-2\">\n                                <label for=\"email\" className=\"hidden\">\n                                    Email\n                                </label>\n                                <input\n                                    type=\"email\"\n                                    name=\"email\"\n                                    id=\"email\"\n                                    placeholder=\"Email\"\n                                    className=\"w-100 mt-2 py-3 px-3 rounded-lg bg-white border border-gray-400 text-gray-800 font-semibold focus:border-orange-500 focus:outline-none\"\n                                />\n                            </div>\n\n                            <div className=\"flex flex-col mt-2\">\n                                <label for=\"tel\" className=\"hidden\">\n                                    Number\n                                </label>\n                                <input\n                                    type=\"tel\"\n                                    name=\"tel\"\n                                    id=\"tel\"\n                                    placeholder=\"Telephone Number\"\n                                    className=\"w-100 mt-2 py-3 px-3 rounded-lg bg-white border border-gray-400 text-gray-800 font-semibold focus:border-orange-500 focus:outline-none\"\n                                />\n                            </div>\n\n                            <button\n                                type=\"submit\"\n                                className=\"md:w-32 bg-orange-700 hover:bg-blue-dark text-white font-bold py-3 px-6 rounded-lg mt-3 hover:bg-orange-600 transition ease-in-out duration-300\"\n                            >\n                                Submit\n                            </button>\n                        </form>\n                    </div>\n                </div>\n            </div>\n        </div>\n    );\n}"
  },
  {
    "path": "07reactRouter/src/components/Footer/Footer.jsx",
    "content": "import React from 'react'\nimport { Link } from 'react-router-dom';\n\nexport default function Footer() {\n    return (\n        <footer className=\"bg-white border-y\">\n            <div className=\"mx-auto w-full max-w-screen-xl p-4 py-6 lg:py-8\">\n                <div className=\"md:flex md:justify-between\">\n                    <div className=\"mb-6 md:mb-0\">\n                        <Link to=\"/\" className=\"flex items-center\">\n                            <img\n                                src=\"https://alexharkness.com/wp-content/uploads/2020/06/logo-2.png\"\n                                className=\"mr-3 h-16\"\n                                alt=\"Logo\"\n                            />\n                        </Link>\n                    </div>\n                    <div className=\"grid grid-cols-2 gap-8 sm:gap-6 sm:grid-cols-3\">\n                        <div>\n                            <h2 className=\"mb-6 text-sm font-semibold text-gray-900 uppercase\">Resources</h2>\n                            <ul className=\"text-gray-500 font-medium\">\n                                <li className=\"mb-4\">\n                                    <Link to=\"/\" className=\"hover:underline\">\n                                        Home\n                                    </Link>\n                                </li>\n                                <li>\n                                    <Link to=\"/about\" className=\"hover:underline\">\n                                        About\n                                    </Link>\n                                </li>\n                            </ul>\n                        </div>\n                        <div>\n                            <h2 className=\"mb-6 text-sm font-semibold text-gray-900 uppercase\">Follow us</h2>\n                            <ul className=\"text-gray-500 font-medium\">\n                                <li className=\"mb-4\">\n                                    <a\n                                        href=\"https://github.com/hiteshchoudhary\"\n                                        className=\"hover:underline\"\n                                        target=\"_blank\"\n                                        rel=\"noreferrer\"\n                                    >\n                                        Github\n                                    </a>\n                                </li>\n                                <li>\n                                    <Link to=\"/\" className=\"hover:underline\">\n                                        Discord\n                                    </Link>\n                                </li>\n                            </ul>\n                        </div>\n                        <div>\n                            <h2 className=\"mb-6 text-sm font-semibold text-gray-900 uppercase\">Legal</h2>\n                            <ul className=\"text-gray-500 font-medium\">\n                                <li className=\"mb-4\">\n                                    <Link to=\"#\" className=\"hover:underline\">\n                                        Privacy Policy\n                                    </Link>\n                                </li>\n                                <li>\n                                    <Link to=\"#\" className=\"hover:underline\">\n                                        Terms &amp; Conditions\n                                    </Link>\n                                </li>\n                            </ul>\n                        </div>\n                    </div>\n                </div>\n                <hr className=\"my-6 border-gray-200 sm:mx-auto lg:my-8\" />\n                <div className=\"sm:flex sm:items-center sm:justify-between\">\n                    <span className=\"text-sm text-gray-500 sm:text-center\">\n                        © 2023\n                        <a href=\"https://hiteshchoudhary.com/\" className=\"hover:underline\">\n                            hiteshchoudhary\n                        </a>\n                        . All Rights Reserved.\n                    </span>\n                    <div className=\"flex mt-4 space-x-5 sm:justify-center sm:mt-0\">\n                        <Link to=\"#\" className=\"text-gray-500 hover:text-gray-900\">\n                            <svg\n                                className=\"w-4 h-4\"\n                                aria-hidden=\"true\"\n                                xmlns=\"http://www.w3.org/2000/svg\"\n                                fill=\"currentColor\"\n                                viewBox=\"0 0 8 19\"\n                            >\n                                <path\n                                    fill-rule=\"evenodd\"\n                                    d=\"M6.135 3H8V0H6.135a4.147 4.147 0 0 0-4.142 4.142V6H0v3h2v9.938h3V9h2.021l.592-3H5V3.591A.6.6 0 0 1 5.592 3h.543Z\"\n                                    clip-rule=\"evenodd\"\n                                />\n                            </svg>\n                            <span className=\"sr-only\">Facebook page</span>\n                        </Link>\n                        <Link to=\"#\" className=\"text-gray-500\">\n                            <svg\n                                className=\"w-4 h-4\"\n                                aria-hidden=\"true\"\n                                xmlns=\"http://www.w3.org/2000/svg\"\n                                fill=\"currentColor\"\n                                viewBox=\"0 0 21 16\"\n                            >\n                                <path d=\"M16.942 1.556a16.3 16.3 0 0 0-4.126-1.3 12.04 12.04 0 0 0-.529 1.1 15.175 15.175 0 0 0-4.573 0 11.585 11.585 0 0 0-.535-1.1 16.274 16.274 0 0 0-4.129 1.3A17.392 17.392 0 0 0 .182 13.218a15.785 15.785 0 0 0 4.963 2.521c.41-.564.773-1.16 1.084-1.785a10.63 10.63 0 0 1-1.706-.83c.143-.106.283-.217.418-.33a11.664 11.664 0 0 0 10.118 0c.137.113.277.224.418.33-.544.328-1.116.606-1.71.832a12.52 12.52 0 0 0 1.084 1.785 16.46 16.46 0 0 0 5.064-2.595 17.286 17.286 0 0 0-2.973-11.59ZM6.678 10.813a1.941 1.941 0 0 1-1.8-2.045 1.93 1.93 0 0 1 1.8-2.047 1.919 1.919 0 0 1 1.8 2.047 1.93 1.93 0 0 1-1.8 2.045Zm6.644 0a1.94 1.94 0 0 1-1.8-2.045 1.93 1.93 0 0 1 1.8-2.047 1.918 1.918 0 0 1 1.8 2.047 1.93 1.93 0 0 1-1.8 2.045Z\" />\n                            </svg>\n                            <span className=\"sr-only\">Discord community</span>\n                        </Link>\n                        <Link to=\"#\" className=\"text-gray-500\">\n                            <svg\n                                className=\"w-4 h-4\"\n                                aria-hidden=\"true\"\n                                xmlns=\"http://www.w3.org/2000/svg\"\n                                fill=\"currentColor\"\n                                viewBox=\"0 0 20 17\"\n                            >\n                                <path\n                                    fill-rule=\"evenodd\"\n                                    d=\"M20 1.892a8.178 8.178 0 0 1-2.355.635 4.074 4.074 0 0 0 1.8-2.235 8.344 8.344 0 0 1-2.605.98A4.13 4.13 0 0 0 13.85 0a4.068 4.068 0 0 0-4.1 4.038 4 4 0 0 0 .105.919A11.705 11.705 0 0 1 1.4.734a4.006 4.006 0 0 0 1.268 5.392 4.165 4.165 0 0 1-1.859-.5v.05A4.057 4.057 0 0 0 4.1 9.635a4.19 4.19 0 0 1-1.856.07 4.108 4.108 0 0 0 3.831 2.807A8.36 8.36 0 0 1 0 14.184 11.732 11.732 0 0 0 6.291 16 11.502 11.502 0 0 0 17.964 4.5c0-.177 0-.35-.012-.523A8.143 8.143 0 0 0 20 1.892Z\"\n                                    clip-rule=\"evenodd\"\n                                />\n                            </svg>\n                            <span className=\"sr-only\">Twitter page</span>\n                        </Link>\n                        <Link to=\"#\" className=\"text-gray-500\">\n                            <svg\n                                className=\"w-4 h-4\"\n                                aria-hidden=\"true\"\n                                xmlns=\"http://www.w3.org/2000/svg\"\n                                fill=\"currentColor\"\n                                viewBox=\"0 0 20 20\"\n                            >\n                                <path\n                                    fill-rule=\"evenodd\"\n                                    d=\"M10 .333A9.911 9.911 0 0 0 6.866 19.65c.5.092.678-.215.678-.477 0-.237-.01-1.017-.014-1.845-2.757.6-3.338-1.169-3.338-1.169a2.627 2.627 0 0 0-1.1-1.451c-.9-.615.07-.6.07-.6a2.084 2.084 0 0 1 1.518 1.021 2.11 2.11 0 0 0 2.884.823c.044-.503.268-.973.63-1.325-2.2-.25-4.516-1.1-4.516-4.9A3.832 3.832 0 0 1 4.7 7.068a3.56 3.56 0 0 1 .095-2.623s.832-.266 2.726 1.016a9.409 9.409 0 0 1 4.962 0c1.89-1.282 2.717-1.016 2.717-1.016.366.83.402 1.768.1 2.623a3.827 3.827 0 0 1 1.02 2.659c0 3.807-2.319 4.644-4.525 4.889a2.366 2.366 0 0 1 .673 1.834c0 1.326-.012 2.394-.012 2.72 0 .263.18.572.681.475A9.911 9.911 0 0 0 10 .333Z\"\n                                    clip-rule=\"evenodd\"\n                                />\n                            </svg>\n                            <span className=\"sr-only\">GitHub account</span>\n                        </Link>\n                        <Link to=\"#\" className=\"text-gray-500\">\n                            <svg\n                                className=\"w-4 h-4\"\n                                aria-hidden=\"true\"\n                                xmlns=\"http://www.w3.org/2000/svg\"\n                                fill=\"currentColor\"\n                                viewBox=\"0 0 20 20\"\n                            >\n                                <path\n                                    fill-rule=\"evenodd\"\n                                    d=\"M10 0a10 10 0 1 0 10 10A10.009 10.009 0 0 0 10 0Zm6.613 4.614a8.523 8.523 0 0 1 1.93 5.32 20.094 20.094 0 0 0-5.949-.274c-.059-.149-.122-.292-.184-.441a23.879 23.879 0 0 0-.566-1.239 11.41 11.41 0 0 0 4.769-3.366ZM8 1.707a8.821 8.821 0 0 1 2-.238 8.5 8.5 0 0 1 5.664 2.152 9.608 9.608 0 0 1-4.476 3.087A45.758 45.758 0 0 0 8 1.707ZM1.642 8.262a8.57 8.57 0 0 1 4.73-5.981A53.998 53.998 0 0 1 9.54 7.222a32.078 32.078 0 0 1-7.9 1.04h.002Zm2.01 7.46a8.51 8.51 0 0 1-2.2-5.707v-.262a31.64 31.64 0 0 0 8.777-1.219c.243.477.477.964.692 1.449-.114.032-.227.067-.336.1a13.569 13.569 0 0 0-6.942 5.636l.009.003ZM10 18.556a8.508 8.508 0 0 1-5.243-1.8 11.717 11.717 0 0 1 6.7-5.332.509.509 0 0 1 .055-.02 35.65 35.65 0 0 1 1.819 6.476 8.476 8.476 0 0 1-3.331.676Zm4.772-1.462A37.232 37.232 0 0 0 13.113 11a12.513 12.513 0 0 1 5.321.364 8.56 8.56 0 0 1-3.66 5.73h-.002Z\"\n                                    clip-rule=\"evenodd\"\n                                />\n                            </svg>\n                            <span className=\"sr-only\">Dribbble account</span>\n                        </Link>\n                    </div>\n                </div>\n            </div>\n        </footer>\n    );\n}"
  },
  {
    "path": "07reactRouter/src/components/Github/Github.jsx",
    "content": "import React, { useEffect, useState } from 'react'\nimport { useLoaderData } from 'react-router-dom'\n\nfunction Github() {\n    const data = useLoaderData()\n    // const [data, setData] = useState([])\n    // useEffect(() => {\n    //  fetch('https://api.github.com/users/hiteshchoudhary')\n    //  .then(response => response.json())\n    //  .then(data => {\n    //     console.log(data);\n    //     setData(data)\n    //  })\n    // }, [])\n    \n  return (\n    <div className='text-center m-4 bg-gray-600 text-white p-4 text-3xl'>Github followers: {data.followers}\n    <img src={data.avatar_url} alt=\"Git picture\" width={300} />\n    </div>\n  )\n}\n\nexport default Github\n\nexport const githubInfoLoader = async () => {\n    const response = await fetch('https://api.github.com/users/hiteshchoudhary')\n    return response.json()\n}"
  },
  {
    "path": "07reactRouter/src/components/Header/Header.jsx",
    "content": "import React from 'react'\nimport {Link, NavLink} from 'react-router-dom'\n\nexport default function Header() {\n    return (\n        <header className=\"shadow sticky z-50 top-0\">\n            <nav className=\"bg-white border-gray-200 px-4 lg:px-6 py-2.5\">\n                <div className=\"flex flex-wrap justify-between items-center mx-auto max-w-screen-xl\">\n                    <Link to=\"/\" className=\"flex items-center\">\n                        <img\n                            src=\"https://alexharkness.com/wp-content/uploads/2020/06/logo-2.png\"\n                            className=\"mr-3 h-12\"\n                            alt=\"Logo\"\n                        />\n                    </Link>\n                    <div className=\"flex items-center lg:order-2\">\n                        <Link\n                            to=\"#\"\n                            className=\"text-gray-800 hover:bg-gray-50 focus:ring-4 focus:ring-gray-300 font-medium rounded-lg text-sm px-4 lg:px-5 py-2 lg:py-2.5 mr-2 focus:outline-none\"\n                        >\n                            Log in\n                        </Link>\n                        <Link\n                            to=\"#\"\n                            className=\"text-white bg-orange-700 hover:bg-orange-800 focus:ring-4 focus:ring-orange-300 font-medium rounded-lg text-sm px-4 lg:px-5 py-2 lg:py-2.5 mr-2 focus:outline-none\"\n                        >\n                            Get started\n                        </Link>\n                    </div>\n                    <div\n                        className=\"hidden justify-between items-center w-full lg:flex lg:w-auto lg:order-1\"\n                        id=\"mobile-menu-2\"\n                    >\n                        <ul className=\"flex flex-col mt-4 font-medium lg:flex-row lg:space-x-8 lg:mt-0\">\n                            <li>\n                                <NavLink\n                                to=\"/\"\n                                    className={({isActive}) =>\n                                        `block py-2 pr-4 pl-3 duration-200 ${isActive ? \"text-orange-700\" : \"text-gray-700\"} border-b border-gray-100 hover:bg-gray-50 lg:hover:bg-transparent lg:border-0 hover:text-orange-700 lg:p-0`\n                                    }\n                                >\n                                    Home\n                                </NavLink>\n                            </li>\n                            <li>\n                                <NavLink\n                                to=\"/about\"\n                                    className={({isActive}) =>\n                                        `block py-2 pr-4 pl-3 duration-200 ${isActive ? \"text-orange-700\" : \"text-gray-700\"} border-b border-gray-100 hover:bg-gray-50 lg:hover:bg-transparent lg:border-0 hover:text-orange-700 lg:p-0`\n                                    }\n                                >\n                                    About\n                                </NavLink>\n                            </li>\n                            <li>\n                                <NavLink\n                                to=\"/contact\"\n                                    className={({isActive}) =>\n                                        `block py-2 pr-4 pl-3 duration-200 ${isActive ? \"text-orange-700\" : \"text-gray-700\"} border-b border-gray-100 hover:bg-gray-50 lg:hover:bg-transparent lg:border-0 hover:text-orange-700 lg:p-0`\n                                    }\n                                >\n                                    Contact\n                                </NavLink>\n                            </li>\n                            <li>\n                                <NavLink\n                                to=\"/github\"\n                                    className={({isActive}) =>\n                                        `block py-2 pr-4 pl-3 duration-200 ${isActive ? \"text-orange-700\" : \"text-gray-700\"} border-b border-gray-100 hover:bg-gray-50 lg:hover:bg-transparent lg:border-0 hover:text-orange-700 lg:p-0`\n                                    }\n                                >\n                                    Github\n                                </NavLink>\n                            </li>\n                            \n                        </ul>\n                    </div>\n                </div>\n            </nav>\n        </header>\n    );\n}"
  },
  {
    "path": "07reactRouter/src/components/Home/Home.jsx",
    "content": "import React from 'react'\nimport { Link } from 'react-router-dom';\n\nexport default function Home() {\n    return (\n        <div className=\"mx-auto w-full max-w-7xl\">\n            <aside className=\"relative overflow-hidden text-black rounded-lg sm:mx-16 mx-2 sm:py-16\">\n                <div className=\"relative z-10 max-w-screen-xl px-4  pb-20 pt-10 sm:py-24 mx-auto sm:px-6 lg:px-8\">\n                    <div className=\"max-w-xl sm:mt-1 mt-80 space-y-8 text-center sm:text-right sm:ml-auto\">\n                        <h2 className=\"text-4xl font-bold sm:text-5xl\">\n                            Download Now\n                            <span className=\"hidden sm:block text-4xl\">Lorem Ipsum</span>\n                        </h2>\n\n                        <Link\n                            className=\"inline-flex text-white items-center px-6 py-3 font-medium bg-orange-700 rounded-lg hover:opacity-75\"\n                            to=\"/\"\n                        >\n                            <svg\n                                fill=\"white\"\n                                width=\"24\"\n                                height=\"24\"\n                                xmlns=\"http://www.w3.org/2000/svg\"\n                                fillRule=\"evenodd\"\n                                clipRule=\"evenodd\"\n                            >\n                                <path d=\"M1.571 23.664l10.531-10.501 3.712 3.701-12.519 6.941c-.476.264-1.059.26-1.532-.011l-.192-.13zm9.469-11.56l-10.04 10.011v-20.022l10.04 10.011zm6.274-4.137l4.905 2.719c.482.268.781.77.781 1.314s-.299 1.046-.781 1.314l-5.039 2.793-4.015-4.003 4.149-4.137zm-15.854-7.534c.09-.087.191-.163.303-.227.473-.271 1.056-.275 1.532-.011l12.653 7.015-3.846 3.835-10.642-10.612z\" />\n                            </svg>\n                            &nbsp; Download now\n                        </Link>\n                    </div>\n                </div>\n\n                <div className=\"absolute inset-0 w-full sm:my-20 sm:pt-1 pt-12 h-full \">\n                    <img className=\"w-96\" src=\"https://i.ibb.co/5BCcDYB/Remote2.png\" alt=\"image1\" />\n                </div>\n            </aside>\n\n            <div className=\"grid  place-items-center sm:mt-20\">\n                <img className=\"sm:w-96 w-48\" src=\"https://i.ibb.co/2M7rtLk/Remote1.png\" alt=\"image2\" />\n            </div>\n\n            <h1 className=\"text-center text-2xl sm:text-5xl py-10 font-medium\">Lorem Ipsum Yojo</h1>\n        </div>\n    );\n}"
  },
  {
    "path": "07reactRouter/src/components/User/User.jsx",
    "content": "import React from 'react'\nimport { useParams } from 'react-router-dom'\n\nfunction User() {\n    const {userid} = useParams()\n  return (\n    <div className='bg-gray-600 text-white text-3xl p-4'>User: {userid}</div>\n  )\n}\n\nexport default User"
  },
  {
    "path": "07reactRouter/src/index.css",
    "content": "@tailwind base;\n@tailwind components;\n@tailwind utilities;"
  },
  {
    "path": "07reactRouter/src/main.jsx",
    "content": "import React from 'react'\nimport ReactDOM from 'react-dom/client'\nimport App from './App.jsx'\nimport './index.css'\nimport { Route, RouterProvider, createBrowserRouter, createRoutesFromElements } from 'react-router-dom'\nimport Layout from './Layout.jsx'\nimport Home from './components/Home/Home.jsx'\nimport About from './components/About/About.jsx'\nimport Contact from './components/Contact/Contact.jsx'\nimport User from './components/User/User.jsx'\nimport Github, { githubInfoLoader } from './components/Github/Github.jsx'\n\n// const router = createBrowserRouter([\n//   {\n//     path: '/',\n//     element: <Layout/>,\n//     children: [\n//       {\n//         path: \"\",\n//         element: <Home />\n//       },\n//       {\n//         path: \"about\",\n//         element: <About />\n//       },\n//       {\n//         path: \"contact\",\n//         element: <Contact />\n//       }\n//     ]\n//   }\n// ])\n\nconst router = createBrowserRouter(\n  createRoutesFromElements(\n    <Route path='/' element={<Layout />}>\n      <Route path='' element={<Home />} />\n      <Route path='about' element={<About />} />\n      <Route path='contact' element={<Contact />} />\n      <Route path='user/:userid' element={<User />} />\n      <Route \n      loader={githubInfoLoader}\n      path='github' \n      element={<Github />}\n       />\n    </Route>\n  )\n)\n\nReactDOM.createRoot(document.getElementById('root')).render(\n  <React.StrictMode>\n    <RouterProvider router={router} />\n  </React.StrictMode>,\n)\n"
  },
  {
    "path": "07reactRouter/tailwind.config.js",
    "content": "/** @type {import('tailwindcss').Config} */\nexport default {\n  content: [\n    \"./index.html\",\n    \"./src/**/*.{js,ts,jsx,tsx}\",\n  ],\n  theme: {\n    extend: {},\n  },\n  plugins: [],\n}\n\n"
  },
  {
    "path": "07reactRouter/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport react from '@vitejs/plugin-react'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [react()],\n})\n"
  },
  {
    "path": "08miniContext/.eslintrc.cjs",
    "content": "module.exports = {\n  root: true,\n  env: { browser: true, es2020: true },\n  extends: [\n    'eslint:recommended',\n    'plugin:react/recommended',\n    'plugin:react/jsx-runtime',\n    'plugin:react-hooks/recommended',\n  ],\n  ignorePatterns: ['dist', '.eslintrc.cjs'],\n  parserOptions: { ecmaVersion: 'latest', sourceType: 'module' },\n  settings: { react: { version: '18.2' } },\n  plugins: ['react-refresh'],\n  rules: {\n    'react-refresh/only-export-components': [\n      'warn',\n      { allowConstantExport: true },\n    ],\n  },\n}\n"
  },
  {
    "path": "08miniContext/.gitignore",
    "content": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npnpm-debug.log*\nlerna-debug.log*\n\nnode_modules\ndist\ndist-ssr\n*.local\n\n# Editor directories and files\n.vscode/*\n!.vscode/extensions.json\n.idea\n.DS_Store\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n*.sw?\n"
  },
  {
    "path": "08miniContext/README.md",
    "content": "# React + Vite\n\nThis template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.\n\nCurrently, two official plugins are available:\n\n- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh\n- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh\n"
  },
  {
    "path": "08miniContext/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <link rel=\"icon\" type=\"image/svg+xml\" href=\"/vite.svg\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite + React</title>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.jsx\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "08miniContext/package.json",
    "content": "{\n  \"name\": \"08minicontext\",\n  \"private\": true,\n  \"version\": \"0.0.0\",\n  \"type\": \"module\",\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"lint\": \"eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0\",\n    \"preview\": \"vite preview\"\n  },\n  \"dependencies\": {\n    \"react\": \"^18.2.0\",\n    \"react-dom\": \"^18.2.0\"\n  },\n  \"devDependencies\": {\n    \"@types/react\": \"^18.2.15\",\n    \"@types/react-dom\": \"^18.2.7\",\n    \"@vitejs/plugin-react\": \"^4.0.3\",\n    \"eslint\": \"^8.45.0\",\n    \"eslint-plugin-react\": \"^7.32.2\",\n    \"eslint-plugin-react-hooks\": \"^4.6.0\",\n    \"eslint-plugin-react-refresh\": \"^0.4.3\",\n    \"vite\": \"^4.4.5\"\n  }\n}\n"
  },
  {
    "path": "08miniContext/src/App.css",
    "content": "#root {\n  max-width: 1280px;\n  margin: 0 auto;\n  padding: 2rem;\n  text-align: center;\n}\n\n.logo {\n  height: 6em;\n  padding: 1.5em;\n  will-change: filter;\n  transition: filter 300ms;\n}\n.logo:hover {\n  filter: drop-shadow(0 0 2em #646cffaa);\n}\n.logo.react:hover {\n  filter: drop-shadow(0 0 2em #61dafbaa);\n}\n\n@keyframes logo-spin {\n  from {\n    transform: rotate(0deg);\n  }\n  to {\n    transform: rotate(360deg);\n  }\n}\n\n@media (prefers-reduced-motion: no-preference) {\n  a:nth-of-type(2) .logo {\n    animation: logo-spin infinite 20s linear;\n  }\n}\n\n.card {\n  padding: 2em;\n}\n\n.read-the-docs {\n  color: #888;\n}\n"
  },
  {
    "path": "08miniContext/src/App.jsx",
    "content": "\nimport './App.css'\nimport Login from './components/Login'\nimport Profile from './components/Profile'\nimport UserContextProvider from './context/UserContextProvider'\n\nfunction App() {\n  \n\n  return (\n    <UserContextProvider>\n      <h1>React with Chai and share is important</h1>\n      <Login />\n      <Profile />\n    </UserContextProvider>\n  )\n}\n\nexport default App\n"
  },
  {
    "path": "08miniContext/src/components/Login.jsx",
    "content": "import React, {useState, useContext} from 'react'\nimport UserContext from '../context/UserContext'\n\nfunction Login() {\n    const [username, setUsername] = useState('')\n    const [password, setPassword] = useState('')\n\n    const {setUser} = useContext(UserContext)\n\n    const handleSubmit = (e) => {\n        e.preventDefault()\n        setUser({username, password})\n    }\n  return (\n    <div>\n        <h2>Login</h2>\n        <input type='text'\n        value={username}\n        onChange={(e) => setUsername(e.target.value) }\n        placeholder='username'  />\n        {\" \"}\n        <input type='text' \n        value={password}\n        onChange={(e) => setPassword(e.target.value) }\n        placeholder='password'  />\n        <button onClick={handleSubmit}>Submit</button>\n    </div>\n  )\n}\n\nexport default Login"
  },
  {
    "path": "08miniContext/src/components/Profile.jsx",
    "content": "import React, {useContext} from 'react'\nimport UserContext from '../context/UserContext'\n\nfunction Profile() {\n    const {user} = useContext(UserContext)\n    \n    if (!user) return <div>please login</div>\n\n    return <div>Welcome {user.username}</div>\n}\n\nexport default Profile"
  },
  {
    "path": "08miniContext/src/context/UserContext.js",
    "content": "import React from 'react'\n\nconst UserContext = React.createContext()\n\nexport default UserContext;\n\n"
  },
  {
    "path": "08miniContext/src/context/UserContextProvider.jsx",
    "content": "import React from \"react\";\nimport UserContext from \"./UserContext\";\n\nconst UserContextProvider = ({children}) => {\n    const [user, setUser] = React.useState(null)\n    return(\n        <UserContext.Provider value={{user, setUser}}>\n        {children}\n        </UserContext.Provider>\n    )\n}\n\nexport default UserContextProvider"
  },
  {
    "path": "08miniContext/src/index.css",
    "content": ":root {\n  font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;\n  line-height: 1.5;\n  font-weight: 400;\n\n  color-scheme: light dark;\n  color: rgba(255, 255, 255, 0.87);\n  background-color: #242424;\n\n  font-synthesis: none;\n  text-rendering: optimizeLegibility;\n  -webkit-font-smoothing: antialiased;\n  -moz-osx-font-smoothing: grayscale;\n  -webkit-text-size-adjust: 100%;\n}\n\na {\n  font-weight: 500;\n  color: #646cff;\n  text-decoration: inherit;\n}\na:hover {\n  color: #535bf2;\n}\n\nbody {\n  margin: 0;\n  display: flex;\n  place-items: center;\n  min-width: 320px;\n  min-height: 100vh;\n}\n\nh1 {\n  font-size: 3.2em;\n  line-height: 1.1;\n}\n\nbutton {\n  border-radius: 8px;\n  border: 1px solid transparent;\n  padding: 0.6em 1.2em;\n  font-size: 1em;\n  font-weight: 500;\n  font-family: inherit;\n  background-color: #1a1a1a;\n  cursor: pointer;\n  transition: border-color 0.25s;\n}\nbutton:hover {\n  border-color: #646cff;\n}\nbutton:focus,\nbutton:focus-visible {\n  outline: 4px auto -webkit-focus-ring-color;\n}\n\n@media (prefers-color-scheme: light) {\n  :root {\n    color: #213547;\n    background-color: #ffffff;\n  }\n  a:hover {\n    color: #747bff;\n  }\n  button {\n    background-color: #f9f9f9;\n  }\n}\n"
  },
  {
    "path": "08miniContext/src/main.jsx",
    "content": "import React from 'react'\nimport ReactDOM from 'react-dom/client'\nimport App from './App.jsx'\nimport './index.css'\n\nReactDOM.createRoot(document.getElementById('root')).render(\n  <React.StrictMode>\n    <App />\n  </React.StrictMode>,\n)\n"
  },
  {
    "path": "08miniContext/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport react from '@vitejs/plugin-react'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [react()],\n})\n"
  },
  {
    "path": "09themeswitcher/.eslintrc.cjs",
    "content": "module.exports = {\n  root: true,\n  env: { browser: true, es2020: true },\n  extends: [\n    'eslint:recommended',\n    'plugin:react/recommended',\n    'plugin:react/jsx-runtime',\n    'plugin:react-hooks/recommended',\n  ],\n  ignorePatterns: ['dist', '.eslintrc.cjs'],\n  parserOptions: { ecmaVersion: 'latest', sourceType: 'module' },\n  settings: { react: { version: '18.2' } },\n  plugins: ['react-refresh'],\n  rules: {\n    'react-refresh/only-export-components': [\n      'warn',\n      { allowConstantExport: true },\n    ],\n  },\n}\n"
  },
  {
    "path": "09themeswitcher/.gitignore",
    "content": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npnpm-debug.log*\nlerna-debug.log*\n\nnode_modules\ndist\ndist-ssr\n*.local\n\n# Editor directories and files\n.vscode/*\n!.vscode/extensions.json\n.idea\n.DS_Store\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n*.sw?\n"
  },
  {
    "path": "09themeswitcher/README.md",
    "content": "# React + Vite\n\nThis template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.\n\nCurrently, two official plugins are available:\n\n- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh\n- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh\n"
  },
  {
    "path": "09themeswitcher/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <link rel=\"icon\" type=\"image/svg+xml\" href=\"/vite.svg\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite + React</title>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.jsx\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "09themeswitcher/package.json",
    "content": "{\n  \"name\": \"09themeswitcher\",\n  \"private\": true,\n  \"version\": \"0.0.0\",\n  \"type\": \"module\",\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"lint\": \"eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0\",\n    \"preview\": \"vite preview\"\n  },\n  \"dependencies\": {\n    \"react\": \"^18.2.0\",\n    \"react-dom\": \"^18.2.0\"\n  },\n  \"devDependencies\": {\n    \"@types/react\": \"^18.2.15\",\n    \"@types/react-dom\": \"^18.2.7\",\n    \"@vitejs/plugin-react\": \"^4.0.3\",\n    \"autoprefixer\": \"^10.4.15\",\n    \"eslint\": \"^8.45.0\",\n    \"eslint-plugin-react\": \"^7.32.2\",\n    \"eslint-plugin-react-hooks\": \"^4.6.0\",\n    \"eslint-plugin-react-refresh\": \"^0.4.3\",\n    \"postcss\": \"^8.4.29\",\n    \"tailwindcss\": \"^3.3.3\",\n    \"vite\": \"^4.4.5\"\n  }\n}\n"
  },
  {
    "path": "09themeswitcher/postcss.config.js",
    "content": "export default {\n  plugins: {\n    tailwindcss: {},\n    autoprefixer: {},\n  },\n}\n"
  },
  {
    "path": "09themeswitcher/src/App.css",
    "content": ""
  },
  {
    "path": "09themeswitcher/src/App.jsx",
    "content": "\nimport { useEffect, useState } from 'react'\nimport './App.css'\nimport { ThemeProvider } from './contexts/theme'\nimport ThemeBtn from './components/ThemeBtn'\nimport Card from './components/Card'\n\nfunction App() {\n  const [themeMode, setThemeMode] = useState(\"light\")\n\n  const lightTheme = () => {\n    setThemeMode(\"light\")\n  }\n\n  const darkTheme = () => {\n    setThemeMode(\"dark\")\n  }\n\n  // actual change in theme\n\n  useEffect(() => {\n    document.querySelector('html').classList.remove(\"light\", \"dark\")\n    document.querySelector('html').classList.add(themeMode)\n  }, [themeMode])\n  \n\n  return (\n    <ThemeProvider value={{themeMode, lightTheme, darkTheme}}>\n      <div className=\"flex flex-wrap min-h-screen items-center\">\n          <div className=\"w-full\">\n              <div className=\"w-full max-w-sm mx-auto flex justify-end mb-4\">\n                  <ThemeBtn />\n              </div>\n\n              <div className=\"w-full max-w-sm mx-auto\">\n                  <Card />\n              </div>\n          </div>\n      </div>\n    </ThemeProvider>\n  )\n}\n\nexport default App\n"
  },
  {
    "path": "09themeswitcher/src/components/Card.jsx",
    "content": "import React from 'react'\n\nexport default function Card() {\n    return (\n        <div className=\"w-full bg-white border border-gray-200 rounded-lg shadow dark:bg-gray-800 dark:border-gray-700\">\n            <a href=\"/\">\n                <img className=\"p-8 rounded-t-lg\" src=\"https://images.pexels.com/photos/18264716/pexels-photo-18264716/free-photo-of-man-people-laptop-internet.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=2\" alt=\"product_image1\" />\n            </a>\n            <div className=\"px-5 pb-5\">\n                <a href=\"/\">\n                    <h5 className=\"text-xl font-semibold tracking-tight text-gray-900 dark:text-white\">\n                        Apple Watch Series 7 GPS, Aluminium Case, Starlight Sport\n                    </h5>\n                </a>\n                <div className=\"flex items-center mt-2.5 mb-5\">\n                    <svg\n                        className=\"w-4 h-4 text-yellow-300 mr-1\"\n                        aria-hidden=\"true\"\n                        xmlns=\"http://www.w3.org/2000/svg\"\n                        fill=\"currentColor\"\n                        viewBox=\"0 0 22 20\"\n                    >\n                        <path d=\"M20.924 7.625a1.523 1.523 0 0 0-1.238-1.044l-5.051-.734-2.259-4.577a1.534 1.534 0 0 0-2.752 0L7.365 5.847l-5.051.734A1.535 1.535 0 0 0 1.463 9.2l3.656 3.563-.863 5.031a1.532 1.532 0 0 0 2.226 1.616L11 17.033l4.518 2.375a1.534 1.534 0 0 0 2.226-1.617l-.863-5.03L20.537 9.2a1.523 1.523 0 0 0 .387-1.575Z\" />\n                    </svg>\n                    <svg\n                        className=\"w-4 h-4 text-yellow-300 mr-1\"\n                        aria-hidden=\"true\"\n                        xmlns=\"http://www.w3.org/2000/svg\"\n                        fill=\"currentColor\"\n                        viewBox=\"0 0 22 20\"\n                    >\n                        <path d=\"M20.924 7.625a1.523 1.523 0 0 0-1.238-1.044l-5.051-.734-2.259-4.577a1.534 1.534 0 0 0-2.752 0L7.365 5.847l-5.051.734A1.535 1.535 0 0 0 1.463 9.2l3.656 3.563-.863 5.031a1.532 1.532 0 0 0 2.226 1.616L11 17.033l4.518 2.375a1.534 1.534 0 0 0 2.226-1.617l-.863-5.03L20.537 9.2a1.523 1.523 0 0 0 .387-1.575Z\" />\n                    </svg>\n                    <svg\n                        className=\"w-4 h-4 text-yellow-300 mr-1\"\n                        aria-hidden=\"true\"\n                        xmlns=\"http://www.w3.org/2000/svg\"\n                        fill=\"currentColor\"\n                        viewBox=\"0 0 22 20\"\n                    >\n                        <path d=\"M20.924 7.625a1.523 1.523 0 0 0-1.238-1.044l-5.051-.734-2.259-4.577a1.534 1.534 0 0 0-2.752 0L7.365 5.847l-5.051.734A1.535 1.535 0 0 0 1.463 9.2l3.656 3.563-.863 5.031a1.532 1.532 0 0 0 2.226 1.616L11 17.033l4.518 2.375a1.534 1.534 0 0 0 2.226-1.617l-.863-5.03L20.537 9.2a1.523 1.523 0 0 0 .387-1.575Z\" />\n                    </svg>\n                    <svg\n                        className=\"w-4 h-4 text-yellow-300 mr-1\"\n                        aria-hidden=\"true\"\n                        xmlns=\"http://www.w3.org/2000/svg\"\n                        fill=\"currentColor\"\n                        viewBox=\"0 0 22 20\"\n                    >\n                        <path d=\"M20.924 7.625a1.523 1.523 0 0 0-1.238-1.044l-5.051-.734-2.259-4.577a1.534 1.534 0 0 0-2.752 0L7.365 5.847l-5.051.734A1.535 1.535 0 0 0 1.463 9.2l3.656 3.563-.863 5.031a1.532 1.532 0 0 0 2.226 1.616L11 17.033l4.518 2.375a1.534 1.534 0 0 0 2.226-1.617l-.863-5.03L20.537 9.2a1.523 1.523 0 0 0 .387-1.575Z\" />\n                    </svg>\n                    <svg\n                        className=\"w-4 h-4 text-gray-200 dark:text-gray-600\"\n                        aria-hidden=\"true\"\n                        xmlns=\"http://www.w3.org/2000/svg\"\n                        fill=\"currentColor\"\n                        viewBox=\"0 0 22 20\"\n                    >\n                        <path d=\"M20.924 7.625a1.523 1.523 0 0 0-1.238-1.044l-5.051-.734-2.259-4.577a1.534 1.534 0 0 0-2.752 0L7.365 5.847l-5.051.734A1.535 1.535 0 0 0 1.463 9.2l3.656 3.563-.863 5.031a1.532 1.532 0 0 0 2.226 1.616L11 17.033l4.518 2.375a1.534 1.534 0 0 0 2.226-1.617l-.863-5.03L20.537 9.2a1.523 1.523 0 0 0 .387-1.575Z\" />\n                    </svg>\n                    <span className=\"bg-blue-100 text-blue-800 text-xs font-semibold mr-2 px-2.5 py-0.5 rounded dark:bg-blue-200 dark:text-blue-800 ml-3\">\n                        4.0\n                    </span>\n                </div>\n                <div className=\"flex items-center justify-between\">\n                    <span className=\"text-3xl font-bold text-gray-900 dark:text-white\">$599</span>\n                    <a\n                        href=\"/\"\n                        className=\"text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800\"\n                    >\n                        Add to cart\n                    </a>\n                </div>\n            </div>\n        </div>\n    );\n}\n"
  },
  {
    "path": "09themeswitcher/src/components/ThemeBtn.jsx",
    "content": "import React from 'react'\nimport useTheme from '../contexts/theme';\n\nexport default function ThemeBtn() {\n    \n    const {themeMode, lightTheme, darkTheme} = useTheme()\n    const onChangeBtn = (e) => {\n        const darkModeStatus = e.currentTarget.checked\n        if (darkModeStatus) {\n            darkTheme()\n        } else {\n            lightTheme()\n        }\n    }\n    return (\n        <label className=\"relative inline-flex items-center cursor-pointer\">\n            <input\n                type=\"checkbox\"\n                value=\"\"\n                className=\"sr-only peer\"\n                onChange={onChangeBtn}\n                checked={themeMode=== \"dark\"}\n            />\n            <div className=\"w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600\"></div>\n            <span className=\"ml-3 text-sm font-medium text-gray-900\">Toggle Theme</span>\n        </label>\n    );\n}"
  },
  {
    "path": "09themeswitcher/src/contexts/theme.js",
    "content": "import { createContext, useContext } from \"react\";\n\nexport const ThemeContext = createContext({\n    themeMode: \"light\",\n    darkTheme: () => {},\n    lightTheme: () => {},\n})\n\nexport const ThemeProvider = ThemeContext.Provider\n\nexport default function useTheme(){\n    return useContext(ThemeContext)\n}"
  },
  {
    "path": "09themeswitcher/src/index.css",
    "content": "@tailwind base;\n@tailwind components;\n@tailwind utilities;"
  },
  {
    "path": "09themeswitcher/src/main.jsx",
    "content": "import React from 'react'\nimport ReactDOM from 'react-dom/client'\nimport App from './App.jsx'\nimport './index.css'\n\nReactDOM.createRoot(document.getElementById('root')).render(\n  <React.StrictMode>\n    <App />\n  </React.StrictMode>,\n)\n"
  },
  {
    "path": "09themeswitcher/tailwind.config.js",
    "content": "/** @type {import('tailwindcss').Config} */\nexport default {\n  content: [\n    \"./index.html\",\n    \"./src/**/*.{js,ts,jsx,tsx}\",\n  ],\n  darkMode: \"class\",\n  theme: {\n    extend: {},\n  },\n  plugins: [],\n}\n\n"
  },
  {
    "path": "09themeswitcher/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport react from '@vitejs/plugin-react'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [react()],\n})\n"
  },
  {
    "path": "10todocontextLocal/.eslintrc.cjs",
    "content": "module.exports = {\n  root: true,\n  env: { browser: true, es2020: true },\n  extends: [\n    'eslint:recommended',\n    'plugin:react/recommended',\n    'plugin:react/jsx-runtime',\n    'plugin:react-hooks/recommended',\n  ],\n  ignorePatterns: ['dist', '.eslintrc.cjs'],\n  parserOptions: { ecmaVersion: 'latest', sourceType: 'module' },\n  settings: { react: { version: '18.2' } },\n  plugins: ['react-refresh'],\n  rules: {\n    'react-refresh/only-export-components': [\n      'warn',\n      { allowConstantExport: true },\n    ],\n  },\n}\n"
  },
  {
    "path": "10todocontextLocal/.gitignore",
    "content": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npnpm-debug.log*\nlerna-debug.log*\n\nnode_modules\ndist\ndist-ssr\n*.local\n\n# Editor directories and files\n.vscode/*\n!.vscode/extensions.json\n.idea\n.DS_Store\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n*.sw?\n"
  },
  {
    "path": "10todocontextLocal/README.md",
    "content": "# React + Vite\n\nThis template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.\n\nCurrently, two official plugins are available:\n\n- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh\n- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh\n"
  },
  {
    "path": "10todocontextLocal/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <link rel=\"icon\" type=\"image/svg+xml\" href=\"/vite.svg\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite + React</title>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.jsx\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "10todocontextLocal/package.json",
    "content": "{\n  \"name\": \"10todocontextlocal\",\n  \"private\": true,\n  \"version\": \"0.0.0\",\n  \"type\": \"module\",\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"lint\": \"eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0\",\n    \"preview\": \"vite preview\"\n  },\n  \"dependencies\": {\n    \"react\": \"^18.2.0\",\n    \"react-dom\": \"^18.2.0\"\n  },\n  \"devDependencies\": {\n    \"@types/react\": \"^18.2.15\",\n    \"@types/react-dom\": \"^18.2.7\",\n    \"@vitejs/plugin-react\": \"^4.0.3\",\n    \"autoprefixer\": \"^10.4.15\",\n    \"eslint\": \"^8.45.0\",\n    \"eslint-plugin-react\": \"^7.32.2\",\n    \"eslint-plugin-react-hooks\": \"^4.6.0\",\n    \"eslint-plugin-react-refresh\": \"^0.4.3\",\n    \"postcss\": \"^8.4.29\",\n    \"tailwindcss\": \"^3.3.3\",\n    \"vite\": \"^4.4.5\"\n  }\n}\n"
  },
  {
    "path": "10todocontextLocal/postcss.config.js",
    "content": "export default {\n  plugins: {\n    tailwindcss: {},\n    autoprefixer: {},\n  },\n}\n"
  },
  {
    "path": "10todocontextLocal/src/App.css",
    "content": "\n"
  },
  {
    "path": "10todocontextLocal/src/App.jsx",
    "content": "import { useState, useEffect } from 'react'\nimport {TodoProvider} from './contexts'\nimport './App.css'\nimport TodoForm from './components/TodoForm'\nimport TodoItem from './components/TodoItem'\n\nfunction App() {\n  const [todos, setTodos] = useState([])\n\n  const addTodo = (todo) => {\n    setTodos((prev) => [{id: Date.now(), ...todo}, ...prev] )\n  }\n\n  const updateTodo = (id, todo) => {\n    setTodos((prev) => prev.map((prevTodo) => (prevTodo.id === id ? todo : prevTodo )))\n\n    \n  }\n\n  const deleteTodo = (id) => {\n    setTodos((prev) => prev.filter((todo) => todo.id !== id))\n  }\n\n  const toggleComplete = (id) => {\n    //console.log(id);\n    setTodos((prev) => \n    prev.map((prevTodo) => \n      prevTodo.id === id ? { ...prevTodo, \n        completed: !prevTodo.completed } : prevTodo))\n  }\n\n  useEffect(() => {\n    const todos = JSON.parse(localStorage.getItem(\"todos\"))\n\n    if (todos && todos.length > 0) {\n      setTodos(todos)\n    }\n  }, [])\n\n  useEffect(() => {\n    localStorage.setItem(\"todos\", JSON.stringify(todos))\n  }, [todos])\n  \n\n\n\n  return (\n    <TodoProvider value={{todos, addTodo, updateTodo, deleteTodo, toggleComplete}}>\n      <div className=\"bg-[#172842] min-h-screen py-8\">\n                <div className=\"w-full max-w-2xl mx-auto shadow-md rounded-lg px-4 py-3 text-white\">\n                    <h1 className=\"text-2xl font-bold text-center mb-8 mt-2\">Manage Your Todos</h1>\n                    <div className=\"mb-4\">\n                        {/* Todo form goes here */} \n                        <TodoForm />\n                    </div>\n                    <div className=\"flex flex-wrap gap-y-3\">\n                        {/*Loop and Add TodoItem here */}\n                        {todos.map((todo) => (\n                          <div key={todo.id}\n                          className='w-full'\n                          >\n                            <TodoItem todo={todo} />\n                          </div>\n                        ))}\n                    </div>\n                </div>\n            </div>\n    </TodoProvider>\n  )\n}\n\nexport default App\n"
  },
  {
    "path": "10todocontextLocal/src/components/TodoForm.jsx",
    "content": "import React, { useState } from 'react'\nimport { useTodo } from '../contexts/TodoContext';\n\nfunction TodoForm() {\n    const [todo, setTodo] = useState(\"\")\n    const {addTodo} = useTodo()\n\n    const add = (e) => {\n      e.preventDefault()\n\n      if (!todo) return\n\n      addTodo({ todo, completed: false})\n      setTodo(\"\")\n    }\n\n  return (\n      <form onSubmit={add}  className=\"flex\">\n          <input\n              type=\"text\"\n              placeholder=\"Write Todo...\"\n              className=\"w-full border border-black/10 rounded-l-lg px-3 outline-none duration-150 bg-white/20 py-1.5\"\n              value={todo}\n              onChange={(e) => setTodo(e.target.value)}\n          />\n          <button type=\"submit\" className=\"rounded-r-lg px-3 py-1 bg-green-600 text-white shrink-0\">\n              Add\n          </button>\n      </form>\n  );\n}\n\nexport default TodoForm;"
  },
  {
    "path": "10todocontextLocal/src/components/TodoItem.jsx",
    "content": "import React, { useState } from 'react'\nimport { useTodo } from '../contexts/TodoContext';\n\nfunction TodoItem({ todo }) {\n  const [isTodoEditable, setIsTodoEditable] = useState(false)\n  const [todoMsg, setTodoMsg] = useState(todo.todo)\n  const {updateTodo, deleteTodo, toggleComplete} = useTodo()\n\n  const editTodo = () => {\n    updateTodo(todo.id, {...todo, todo: todoMsg})\n    setIsTodoEditable(false)\n  }\n  const toggleCompleted = () => {\n    //console.log(todo.id);\n    toggleComplete(todo.id)\n  }\n\n  return (\n      <div\n          className={`flex border border-black/10 rounded-lg px-3 py-1.5 gap-x-3 shadow-sm shadow-white/50 duration-300  text-black ${\n              todo.completed ? \"bg-[#c6e9a7]\" : \"bg-[#ccbed7]\"\n          }`}\n      >\n          <input\n              type=\"checkbox\"\n              className=\"cursor-pointer\"\n              checked={todo.completed}\n              onChange={toggleCompleted}\n          />\n          <input\n              type=\"text\"\n              className={`border outline-none w-full bg-transparent rounded-lg ${\n                  isTodoEditable ? \"border-black/10 px-2\" : \"border-transparent\"\n              } ${todo.completed ? \"line-through\" : \"\"}`}\n              value={todoMsg}\n              onChange={(e) => setTodoMsg(e.target.value)}\n              readOnly={!isTodoEditable}\n          />\n          {/* Edit, Save Button */}\n          <button\n              className=\"inline-flex w-8 h-8 rounded-lg text-sm border border-black/10 justify-center items-center bg-gray-50 hover:bg-gray-100 shrink-0 disabled:opacity-50\"\n              onClick={() => {\n                  if (todo.completed) return;\n\n                  if (isTodoEditable) {\n                      editTodo();\n                  } else setIsTodoEditable((prev) => !prev);\n              }}\n              disabled={todo.completed}\n          >\n              {isTodoEditable ? \"📁\" : \"✏️\"}\n          </button>\n          {/* Delete Todo Button */}\n          <button\n              className=\"inline-flex w-8 h-8 rounded-lg text-sm border border-black/10 justify-center items-center bg-gray-50 hover:bg-gray-100 shrink-0\"\n              onClick={() => deleteTodo(todo.id)}\n          >\n              ❌\n          </button>\n      </div>\n  );\n}\n\nexport default TodoItem;\n"
  },
  {
    "path": "10todocontextLocal/src/components/index.js",
    "content": "import TodoForm from \"./TodoForm\";\nimport TodoItem from \"./TodoItem\";\n\nexport {TodoForm, TodoItem}"
  },
  {
    "path": "10todocontextLocal/src/contexts/TodoContext.js",
    "content": "import {createContext, useContext} from \"react\"\n\nexport const TodoContext = createContext({\n    todos: [\n        {\n            id: 1,\n            todo: \" Todo msg\",\n            completed: false,\n        }\n    ],\n    addTodo: (todo) => {},\n    updateTodo: (id, todo) => {},\n    deleteTodo: (id) => {},\n    toggleComplete: (id) => {}\n})\n\n\nexport const useTodo = () => {\n    return useContext(TodoContext)\n}\n\nexport const TodoProvider = TodoContext.Provider"
  },
  {
    "path": "10todocontextLocal/src/contexts/index.js",
    "content": "export {TodoContext, TodoProvider, useTodo} from \"./TodoContext\""
  },
  {
    "path": "10todocontextLocal/src/index.css",
    "content": "@tailwind base;\n@tailwind components;\n@tailwind utilities;"
  },
  {
    "path": "10todocontextLocal/src/main.jsx",
    "content": "import React from 'react'\nimport ReactDOM from 'react-dom/client'\nimport App from './App.jsx'\nimport './index.css'\n\nReactDOM.createRoot(document.getElementById('root')).render(\n  <React.StrictMode>\n    <App />\n  </React.StrictMode>,\n)\n"
  },
  {
    "path": "10todocontextLocal/tailwind.config.js",
    "content": "/** @type {import('tailwindcss').Config} */\nexport default {\n  content: [\n    \"./index.html\",\n    \"./src/**/*.{js,ts,jsx,tsx}\",\n  ],\n  theme: {\n    extend: {},\n  },\n  plugins: [],\n}\n\n"
  },
  {
    "path": "10todocontextLocal/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport react from '@vitejs/plugin-react'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [react()],\n})\n"
  },
  {
    "path": "12MegaBlog/.eslintrc.cjs",
    "content": "module.exports = {\n  root: true,\n  env: { browser: true, es2020: true },\n  extends: [\n    'eslint:recommended',\n    'plugin:react/recommended',\n    'plugin:react/jsx-runtime',\n    'plugin:react-hooks/recommended',\n  ],\n  ignorePatterns: ['dist', '.eslintrc.cjs'],\n  parserOptions: { ecmaVersion: 'latest', sourceType: 'module' },\n  settings: { react: { version: '18.2' } },\n  plugins: ['react-refresh'],\n  rules: {\n    'react-refresh/only-export-components': [\n      'warn',\n      { allowConstantExport: true },\n    ],\n  },\n}\n"
  },
  {
    "path": "12MegaBlog/.gitignore",
    "content": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npnpm-debug.log*\nlerna-debug.log*\n\nnode_modules\ndist\ndist-ssr\n*.local\n\n# Editor directories and files\n.vscode/*\n!.vscode/extensions.json\n.idea\n.DS_Store\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n*.sw?\n"
  },
  {
    "path": "12MegaBlog/README.md",
    "content": "# React + Vite\n\nThis template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.\n\nCurrently, two official plugins are available:\n\n- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh\n- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh\n"
  },
  {
    "path": "12MegaBlog/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <link rel=\"icon\" type=\"image/svg+xml\" href=\"/vite.svg\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite + React</title>\n  </head>\n  <body class=\"bg-slate-400\">\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.jsx\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "12MegaBlog/package.json",
    "content": "{\n  \"name\": \"12megablog\",\n  \"private\": true,\n  \"version\": \"0.0.0\",\n  \"type\": \"module\",\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"lint\": \"eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0\",\n    \"preview\": \"vite preview\"\n  },\n  \"dependencies\": {\n    \"@reduxjs/toolkit\": \"^1.9.5\",\n    \"@tinymce/tinymce-react\": \"^4.3.0\",\n    \"appwrite\": \"^13.0.0\",\n    \"html-react-parser\": \"^4.2.2\",\n    \"react\": \"^18.2.0\",\n    \"react-dom\": \"^18.2.0\",\n    \"react-hook-form\": \"^7.46.1\",\n    \"react-redux\": \"^8.1.2\",\n    \"react-router-dom\": \"^6.16.0\"\n  },\n  \"devDependencies\": {\n    \"@types/react\": \"^18.2.15\",\n    \"@types/react-dom\": \"^18.2.7\",\n    \"@vitejs/plugin-react\": \"^4.0.3\",\n    \"autoprefixer\": \"^10.4.15\",\n    \"eslint\": \"^8.45.0\",\n    \"eslint-plugin-react\": \"^7.32.2\",\n    \"eslint-plugin-react-hooks\": \"^4.6.0\",\n    \"eslint-plugin-react-refresh\": \"^0.4.3\",\n    \"postcss\": \"^8.4.30\",\n    \"tailwindcss\": \"^3.3.3\",\n    \"vite\": \"^4.4.5\"\n  }\n}\n"
  },
  {
    "path": "12MegaBlog/postcss.config.js",
    "content": "export default {\n  plugins: {\n    tailwindcss: {},\n    autoprefixer: {},\n  },\n}\n"
  },
  {
    "path": "12MegaBlog/src/App.css",
    "content": "#root {\n  max-width: 1280px;\n  margin: 0 auto;\n  padding: 2rem;\n  text-align: center;\n}\n\n.logo {\n  height: 6em;\n  padding: 1.5em;\n  will-change: filter;\n  transition: filter 300ms;\n}\n.logo:hover {\n  filter: drop-shadow(0 0 2em #646cffaa);\n}\n.logo.react:hover {\n  filter: drop-shadow(0 0 2em #61dafbaa);\n}\n\n@keyframes logo-spin {\n  from {\n    transform: rotate(0deg);\n  }\n  to {\n    transform: rotate(360deg);\n  }\n}\n\n@media (prefers-reduced-motion: no-preference) {\n  a:nth-of-type(2) .logo {\n    animation: logo-spin infinite 20s linear;\n  }\n}\n\n.card {\n  padding: 2em;\n}\n\n.read-the-docs {\n  color: #888;\n}\n"
  },
  {
    "path": "12MegaBlog/src/App.jsx",
    "content": "import React, { useState, useEffect } from 'react'\nimport { useDispatch } from 'react-redux'\nimport './App.css'\nimport authService from \"./appwrite/auth\"\nimport {login, logout} from \"./store/authSlice\"\nimport { Footer, Header } from './components'\nimport { Outlet } from 'react-router-dom'\n\nfunction App() {\n  const [loading, setLoading] = useState(true)\n  const dispatch = useDispatch()\n\n  useEffect(() => {\n    authService.getCurrentUser()\n    .then((userData) => {\n      if (userData) {\n        dispatch(login({userData}))\n      } else {\n        dispatch(logout())\n      }\n    })\n    .finally(() => setLoading(false))\n  }, [])\n  \n  return !loading ? (\n    <div className='min-h-screen flex flex-wrap content-between bg-gray-400'>\n      <div className='w-full block'>\n        <Header />\n        <main>\n        TODO:  <Outlet />\n        </main>\n        <Footer />\n      </div>\n    </div>\n  ) : null\n}\n\nexport default App\n"
  },
  {
    "path": "12MegaBlog/src/appwrite/auth.js",
    "content": "import conf from '../conf/conf.js';\nimport { Client, Account, ID } from \"appwrite\";\n\n\nexport class AuthService {\n    client = new Client();\n    account;\n\n    constructor() {\n        this.client\n            .setEndpoint(conf.appwriteUrl)\n            .setProject(conf.appwriteProjectId);\n        this.account = new Account(this.client);\n            \n    }\n\n    async createAccount({email, password, name}) {\n        try {\n            const userAccount = await this.account.create(ID.unique(), email, password, name);\n            if (userAccount) {\n                // call another method\n                return this.login({email, password});\n            } else {\n               return  userAccount;\n            }\n        } catch (error) {\n            throw error;\n        }\n    }\n\n    async login({email, password}) {\n        try {\n            return await this.account.createEmailSession(email, password);\n        } catch (error) {\n            throw error;\n        }\n    }\n\n    async getCurrentUser() {\n        try {\n            return await this.account.get();\n        } catch (error) {\n            console.log(\"Appwrite serive :: getCurrentUser :: error\", error);\n        }\n\n        return null;\n    }\n\n    async logout() {\n\n        try {\n            await this.account.deleteSessions();\n        } catch (error) {\n            console.log(\"Appwrite serive :: logout :: error\", error);\n        }\n    }\n}\n\nconst authService = new AuthService();\n\nexport default authService\n\n\n"
  },
  {
    "path": "12MegaBlog/src/appwrite/config.js",
    "content": "import conf from '../conf/conf.js';\nimport { Client, ID, Databases, Storage, Query } from \"appwrite\";\n\nexport class Service{\n    client = new Client();\n    databases;\n    bucket;\n    \n    constructor(){\n        this.client\n        .setEndpoint(conf.appwriteUrl)\n        .setProject(conf.appwriteProjectId);\n        this.databases = new Databases(this.client);\n        this.bucket = new Storage(this.client);\n    }\n\n    async createPost({title, slug, content, featuredImage, status, userId}){\n        try {\n            return await this.databases.createDocument(\n                conf.appwriteDatabaseId,\n                conf.appwriteCollectionId,\n                slug,\n                {\n                    title,\n                    content,\n                    featuredImage,\n                    status,\n                    userId,\n                }\n            )\n        } catch (error) {\n            console.log(\"Appwrite serive :: createPost :: error\", error);\n        }\n    }\n\n    async updatePost(slug, {title, content, featuredImage, status}){\n        try {\n            return await this.databases.updateDocument(\n                conf.appwriteDatabaseId,\n                conf.appwriteCollectionId,\n                slug,\n                {\n                    title,\n                    content,\n                    featuredImage,\n                    status,\n\n                }\n            )\n        } catch (error) {\n            console.log(\"Appwrite serive :: updatePost :: error\", error);\n        }\n    }\n\n    async deletePost(slug){\n        try {\n            await this.databases.deleteDocument(\n                conf.appwriteDatabaseId,\n                conf.appwriteCollectionId,\n                slug\n            \n            )\n            return true\n        } catch (error) {\n            console.log(\"Appwrite serive :: deletePost :: error\", error);\n            return false\n        }\n    }\n\n    async getPost(slug){\n        try {\n            return await this.databases.getDocument(\n                conf.appwriteDatabaseId,\n                conf.appwriteCollectionId,\n                slug\n            \n            )\n        } catch (error) {\n            console.log(\"Appwrite serive :: getPost :: error\", error);\n            return false\n        }\n    }\n\n    async getPosts(queries = [Query.equal(\"status\", \"active\")]){\n        try {\n            return await this.databases.listDocuments(\n                conf.appwriteDatabaseId,\n                conf.appwriteCollectionId,\n                queries,\n                \n\n            )\n        } catch (error) {\n            console.log(\"Appwrite serive :: getPosts :: error\", error);\n            return false\n        }\n    }\n\n    // file upload service\n\n    async uploadFile(file){\n        try {\n            return await this.bucket.createFile(\n                conf.appwriteBucketId,\n                ID.unique(),\n                file\n            )\n        } catch (error) {\n            console.log(\"Appwrite serive :: uploadFile :: error\", error);\n            return false\n        }\n    }\n\n    async deleteFile(fileId){\n        try {\n            await this.bucket.deleteFile(\n                conf.appwriteBucketId,\n                fileId\n            )\n            return true\n        } catch (error) {\n            console.log(\"Appwrite serive :: deleteFile :: error\", error);\n            return false\n        }\n    }\n\n    getFilePreview(fileId){\n        return this.bucket.getFilePreview(\n            conf.appwriteBucketId,\n            fileId\n        )\n    }\n}\n\n\nconst service = new Service()\nexport default service"
  },
  {
    "path": "12MegaBlog/src/components/AuthLayout.jsx",
    "content": "import React, {useEffect, useState} from 'react'\nimport {useSelector} from 'react-redux'\nimport {useNavigate} from 'react-router-dom'\n\nexport default function Protected({children, authentication = true}) {\n\n    const navigate = useNavigate()\n    const [loader, setLoader] = useState(true)\n    const authStatus = useSelector(state => state.auth.status)\n\n    useEffect(() => {\n        //TODO: make it more easy to understand\n\n        // if (authStatus ===true){\n        //     navigate(\"/\")\n        // } else if (authStatus === false) {\n        //     navigate(\"/login\")\n        // }\n        \n        //let authValue = authStatus === true ? true : false\n\n        if(authentication && authStatus !== authentication){\n            navigate(\"/login\")\n        } else if(!authentication && authStatus !== authentication){\n            navigate(\"/\")\n        }\n        setLoader(false)\n    }, [authStatus, navigate, authentication])\n\n  return loader ? <h1>Loading...</h1> : <>{children}</>\n}\n\n"
  },
  {
    "path": "12MegaBlog/src/components/Button.jsx",
    "content": "import React from \"react\";\n\nexport default function Button({\n    children,\n    type = \"button\",\n    bgColor = \"bg-blue-600\",\n    textColor = \"text-white\",\n    className = \"\",\n    ...props\n}) {\n    return (\n        <button className={`px-4 py-2 rounded-lg ${bgColor} ${textColor} ${className}`} {...props}>\n            {children}\n        </button>\n    );\n}\n"
  },
  {
    "path": "12MegaBlog/src/components/Footer/Footer.jsx",
    "content": "import React from 'react'\nimport { Link } from 'react-router-dom'\nimport Logo from '../Logo'\n\nfunction Footer() {\n  return (\n    <section className=\"relative overflow-hidden py-10 bg-gray-400 border border-t-2 border-t-black\">\n            <div className=\"relative z-10 mx-auto max-w-7xl px-4\">\n                <div className=\"-m-6 flex flex-wrap\">\n                    <div className=\"w-full p-6 md:w-1/2 lg:w-5/12\">\n                        <div className=\"flex h-full flex-col justify-between\">\n                            <div className=\"mb-4 inline-flex items-center\">\n                                <Logo width=\"100px\" />\n                            </div>\n                            <div>\n                                <p className=\"text-sm text-gray-600\">\n                                    &copy; Copyright 2023. All Rights Reserved by DevUI.\n                                </p>\n                            </div>\n                        </div>\n                    </div>\n                    <div className=\"w-full p-6 md:w-1/2 lg:w-2/12\">\n                        <div className=\"h-full\">\n                            <h3 className=\"tracking-px mb-9  text-xs font-semibold uppercase text-gray-500\">\n                                Company\n                            </h3>\n                            <ul>\n                                <li className=\"mb-4\">\n                                    <Link\n                                        className=\" text-base font-medium text-gray-900 hover:text-gray-700\"\n                                        to=\"/\"\n                                    >\n                                        Features\n                                    </Link>\n                                </li>\n                                <li className=\"mb-4\">\n                                    <Link\n                                        className=\" text-base font-medium text-gray-900 hover:text-gray-700\"\n                                        to=\"/\"\n                                    >\n                                        Pricing\n                                    </Link>\n                                </li>\n                                <li className=\"mb-4\">\n                                    <Link\n                                        className=\" text-base font-medium text-gray-900 hover:text-gray-700\"\n                                        to=\"/\"\n                                    >\n                                        Affiliate Program\n                                    </Link>\n                                </li>\n                                <li>\n                                    <Link\n                                        className=\" text-base font-medium text-gray-900 hover:text-gray-700\"\n                                        to=\"/\"\n                                    >\n                                        Press Kit\n                                    </Link>\n                                </li>\n                            </ul>\n                        </div>\n                    </div>\n                    <div className=\"w-full p-6 md:w-1/2 lg:w-2/12\">\n                        <div className=\"h-full\">\n                            <h3 className=\"tracking-px mb-9  text-xs font-semibold uppercase text-gray-500\">\n                                Support\n                            </h3>\n                            <ul>\n                                <li className=\"mb-4\">\n                                    <Link\n                                        className=\" text-base font-medium text-gray-900 hover:text-gray-700\"\n                                        to=\"/\"\n                                    >\n                                        Account\n                                    </Link>\n                                </li>\n                                <li className=\"mb-4\">\n                                    <Link\n                                        className=\" text-base font-medium text-gray-900 hover:text-gray-700\"\n                                        to=\"/\"\n                                    >\n                                        Help\n                                    </Link>\n                                </li>\n                                <li className=\"mb-4\">\n                                    <Link\n                                        className=\" text-base font-medium text-gray-900 hover:text-gray-700\"\n                                        to=\"/\"\n                                    >\n                                        Contact Us\n                                    </Link>\n                                </li>\n                                <li>\n                                    <Link\n                                        className=\" text-base font-medium text-gray-900 hover:text-gray-700\"\n                                        to=\"/\"\n                                    >\n                                        Customer Support\n                                    </Link>\n                                </li>\n                            </ul>\n                        </div>\n                    </div>\n                    <div className=\"w-full p-6 md:w-1/2 lg:w-3/12\">\n                        <div className=\"h-full\">\n                            <h3 className=\"tracking-px mb-9  text-xs font-semibold uppercase text-gray-500\">\n                                Legals\n                            </h3>\n                            <ul>\n                                <li className=\"mb-4\">\n                                    <Link\n                                        className=\" text-base font-medium text-gray-900 hover:text-gray-700\"\n                                        to=\"/\"\n                                    >\n                                        Terms &amp; Conditions\n                                    </Link>\n                                </li>\n                                <li className=\"mb-4\">\n                                    <Link\n                                        className=\" text-base font-medium text-gray-900 hover:text-gray-700\"\n                                        to=\"/\"\n                                    >\n                                        Privacy Policy\n                                    </Link>\n                                </li>\n                                <li>\n                                    <Link\n                                        className=\" text-base font-medium text-gray-900 hover:text-gray-700\"\n                                        to=\"/\"\n                                    >\n                                        Licensing\n                                    </Link>\n                                </li>\n                            </ul>\n                        </div>\n                    </div>\n                </div>\n            </div>\n        </section>\n  )\n}\n\nexport default Footer"
  },
  {
    "path": "12MegaBlog/src/components/Header/Header.jsx",
    "content": "import React from 'react'\nimport {Container, Logo, LogoutBtn} from '../index'\nimport { Link } from 'react-router-dom'\nimport {useSelector} from 'react-redux'\nimport { useNavigate } from 'react-router-dom'\n\nfunction Header() {\n  const authStatus = useSelector((state) => state.auth.status)\n  const navigate = useNavigate()\n\n  const navItems = [\n    {\n      name: 'Home',\n      slug: \"/\",\n      active: true\n    }, \n    {\n      name: \"Login\",\n      slug: \"/login\",\n      active: !authStatus,\n  },\n  {\n      name: \"Signup\",\n      slug: \"/signup\",\n      active: !authStatus,\n  },\n  {\n      name: \"All Posts\",\n      slug: \"/all-posts\",\n      active: authStatus,\n  },\n  {\n      name: \"Add Post\",\n      slug: \"/add-post\",\n      active: authStatus,\n  },\n  ]\n\n\n  return (\n    <header className='py-3 shadow bg-gray-500'>\n      <Container>\n        <nav className='flex'>\n          <div className='mr-4'>\n            <Link to='/'>\n              <Logo width='70px'   />\n\n              </Link>\n          </div>\n          <ul className='flex ml-auto'>\n            {navItems.map((item) => \n            item.active ? (\n              <li key={item.name}>\n                <button\n                onClick={() => navigate(item.slug)}\n                className='inline-bock px-6 py-2 duration-200 hover:bg-blue-100 rounded-full'\n                >{item.name}</button>\n              </li>\n            ) : null\n            )}\n            {authStatus && (\n              <li>\n                <LogoutBtn />\n              </li>\n            )}\n          </ul>\n        </nav>\n        </Container>\n    </header>\n  )\n}\n\nexport default Header"
  },
  {
    "path": "12MegaBlog/src/components/Header/LogoutBtn.jsx",
    "content": "import React from 'react'\nimport {useDispatch} from 'react-redux'\nimport authService from '../../appwrite/auth'\nimport {logout} from '../../store/authSlice'\n\nfunction LogoutBtn() {\n    const dispatch = useDispatch()\n    const logoutHandler = () => {\n        authService.logout().then(() => {\n            dispatch(logout())\n        })\n    }\n  return (\n    <button\n    className='inline-bock px-6 py-2 duration-200 hover:bg-blue-100 rounded-full'\n    onClick={logoutHandler}\n    >Logout</button>\n  )\n}\n\nexport default LogoutBtn"
  },
  {
    "path": "12MegaBlog/src/components/Input.jsx",
    "content": "import React, {useId} from 'react'\n\nconst Input = React.forwardRef( function Input({\n    label,\n    type = \"text\",\n    className = \"\",\n    ...props\n}, ref){\n    const id = useId()\n    return (\n        <div className='w-full'>\n            {label && <label \n            className='inline-block mb-1 pl-1' \n            htmlFor={id}>\n                {label}\n            </label>\n            }\n            <input\n            type={type}\n            className={`px-3 py-2 rounded-lg bg-white text-black outline-none focus:bg-gray-50 duration-200 border border-gray-200 w-full ${className}`}\n            ref={ref}\n            {...props}\n            id={id}\n            />\n        </div>\n    )\n})\n\nexport default Input"
  },
  {
    "path": "12MegaBlog/src/components/Login.jsx",
    "content": "import React, {useState} from 'react'\nimport {Link, useNavigate} from 'react-router-dom'\nimport { login as authLogin } from '../store/authSlice'\nimport {Button, Input, Logo} from \"./index\"\nimport {useDispatch} from \"react-redux\"\nimport authService from \"../appwrite/auth\"\nimport {useForm} from \"react-hook-form\"\n\nfunction Login() {\n    const navigate = useNavigate()\n    const dispatch = useDispatch()\n    const {register, handleSubmit} = useForm()\n    const [error, setError] = useState(\"\")\n\n    const login = async(data) => {\n        setError(\"\")\n        try {\n            const session = await authService.login(data)\n            if (session) {\n                const userData = await authService.getCurrentUser()\n                if(userData) dispatch(authLogin(userData));\n                navigate(\"/\")\n            }\n        } catch (error) {\n            setError(error.message)\n        }\n    }\n\n  return (\n    <div\n    className='flex items-center justify-center w-full'\n    >\n        <div className={`mx-auto w-full max-w-lg bg-gray-100 rounded-xl p-10 border border-black/10`}>\n        <div className=\"mb-2 flex justify-center\">\n                    <span className=\"inline-block w-full max-w-[100px]\">\n                        <Logo width=\"100%\" />\n                    </span>\n        </div>\n        <h2 className=\"text-center text-2xl font-bold leading-tight\">Sign in to your account</h2>\n        <p className=\"mt-2 text-center text-base text-black/60\">\n                    Don&apos;t have any account?&nbsp;\n                    <Link\n                        to=\"/signup\"\n                        className=\"font-medium text-primary transition-all duration-200 hover:underline\"\n                    >\n                        Sign Up\n                    </Link>\n        </p>\n        {error && <p className=\"text-red-600 mt-8 text-center\">{error}</p>}\n        <form onSubmit={handleSubmit(login)} className='mt-8'>\n            <div className='space-y-5'>\n                <Input\n                label=\"Email: \"\n                placeholder=\"Enter your email\"\n                type=\"email\"\n                {...register(\"email\", {\n                    required: true,\n                    validate: {\n                        matchPatern: (value) => /^\\w+([.-]?\\w+)*@\\w+([.-]?\\w+)*(\\.\\w{2,3})+$/.test(value) ||\n                        \"Email address must be a valid address\",\n                    }\n                })}\n                />\n                <Input\n                label=\"Password: \"\n                type=\"password\"\n                placeholder=\"Enter your password\"\n                {...register(\"password\", {\n                    required: true,\n                })}\n                />\n                <Button\n                type=\"submit\"\n                className=\"w-full\"\n                >Sign in</Button>\n            </div>\n        </form>\n        </div>\n    </div>\n  )\n}\n\nexport default Login"
  },
  {
    "path": "12MegaBlog/src/components/Logo.jsx",
    "content": "import React from 'react'\n\nfunction Logo({width = '100px'}) {\n  return (\n    <div>Logo</div>\n  )\n}\n\nexport default Logo"
  },
  {
    "path": "12MegaBlog/src/components/PostCard.jsx",
    "content": "import React from 'react'\nimport appwriteService from \"../appwrite/config\"\nimport {Link} from 'react-router-dom'\n\nfunction PostCard({$id, title, featuredImage}) {\n    \n  return (\n    <Link to={`/post/${$id}`}>\n        <div className='w-full bg-gray-100 rounded-xl p-4'>\n            <div className='w-full justify-center mb-4'>\n                <img src={appwriteService.getFilePreview(featuredImage)} alt={title}\n                className='rounded-xl' />\n\n            </div>\n            <h2\n            className='text-xl font-bold'\n            >{title}</h2>\n        </div>\n    </Link>\n  )\n}\n\n\nexport default PostCard"
  },
  {
    "path": "12MegaBlog/src/components/RTE.jsx",
    "content": "import React from 'react'\nimport {Editor } from '@tinymce/tinymce-react';\nimport {Controller } from 'react-hook-form';\n\n\nexport default function RTE({name, control, label, defaultValue =\"\"}) {\n  return (\n    <div className='w-full'> \n    {label && <label className='inline-block mb-1 pl-1'>{label}</label>}\n\n    <Controller\n    name={name || \"content\"}\n    control={control}\n    render={({field: {onChange}}) => (\n        <Editor\n        initialValue={defaultValue}\n        init={{\n            initialValue: defaultValue,\n            height: 500,\n            menubar: true,\n            plugins: [\n                \"image\",\n                \"advlist\",\n                \"autolink\",\n                \"lists\",\n                \"link\",\n                \"image\",\n                \"charmap\",\n                \"preview\",\n                \"anchor\",\n                \"searchreplace\",\n                \"visualblocks\",\n                \"code\",\n                \"fullscreen\",\n                \"insertdatetime\",\n                \"media\",\n                \"table\",\n                \"code\",\n                \"help\",\n                \"wordcount\",\n                \"anchor\",\n            ],\n            toolbar:\n            \"undo redo | blocks | image | bold italic forecolor | alignleft aligncenter bold italic forecolor | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent |removeformat | help\",\n            content_style: \"body { font-family:Helvetica,Arial,sans-serif; font-size:14px }\"\n        }}\n        onEditorChange={onChange}\n        />\n    )}\n    />\n\n     </div>\n  )\n}\n\n"
  },
  {
    "path": "12MegaBlog/src/components/Select.jsx",
    "content": "import React, {useId} from 'react'\n\nfunction Select({\n    options,\n    label,\n    className,\n    ...props\n}, ref) {\n    const id = useId()\n  return (\n    <div className='w-full'>\n        {label && <label htmlFor={id} className=''></label>}\n        <select\n        {...props}\n        id={id}\n        ref={ref}\n        className={`px-3 py-2 rounded-lg bg-white text-black outline-none focus:bg-gray-50 duration-200 border border-gray-200 w-full ${className}`}\n        >\n            {options?.map((option) => (\n                <option key={option} value={option}>\n                    {option}\n                </option>\n            ))}\n        </select>\n    </div>\n  )\n}\n\nexport default React.forwardRef(Select)"
  },
  {
    "path": "12MegaBlog/src/components/Signup.jsx",
    "content": "import React, {useState} from 'react'\nimport authService from '../appwrite/auth'\nimport {Link ,useNavigate} from 'react-router-dom'\nimport {login} from '../store/authSlice'\nimport {Button, Input, Logo} from './index.js'\nimport {useDispatch} from 'react-redux'\nimport {useForm} from 'react-hook-form'\n\nfunction Signup() {\n    const navigate = useNavigate()\n    const [error, setError] = useState(\"\")\n    const dispatch = useDispatch()\n    const {register, handleSubmit} = useForm()\n\n    const create = async(data) => {\n        setError(\"\")\n        try {\n            const userData = await authService.createAccount(data)\n            if (userData) {\n                const userData = await authService.getCurrentUser()\n                if(userData) dispatch(login(userData));\n                navigate(\"/\")\n            }\n        } catch (error) {\n            setError(error.message)\n        }\n    }\n\n  return (\n    <div className=\"flex items-center justify-center\">\n            <div className={`mx-auto w-full max-w-lg bg-gray-100 rounded-xl p-10 border border-black/10`}>\n            <div className=\"mb-2 flex justify-center\">\n                    <span className=\"inline-block w-full max-w-[100px]\">\n                        <Logo width=\"100%\" />\n                    </span>\n                </div>\n                <h2 className=\"text-center text-2xl font-bold leading-tight\">Sign up to create account</h2>\n                <p className=\"mt-2 text-center text-base text-black/60\">\n                    Already have an account?&nbsp;\n                    <Link\n                        to=\"/login\"\n                        className=\"font-medium text-primary transition-all duration-200 hover:underline\"\n                    >\n                        Sign In\n                    </Link>\n                </p>\n                {error && <p className=\"text-red-600 mt-8 text-center\">{error}</p>}\n\n                <form onSubmit={handleSubmit(create)}>\n                    <div className='space-y-5'>\n                        <Input\n                        label=\"Full Name: \"\n                        placeholder=\"Enter your full name\"\n                        {...register(\"name\", {\n                            required: true,\n                        })}\n                        />\n                        <Input\n                        label=\"Email: \"\n                        placeholder=\"Enter your email\"\n                        type=\"email\"\n                        {...register(\"email\", {\n                            required: true,\n                            validate: {\n                                matchPatern: (value) => /^\\w+([.-]?\\w+)*@\\w+([.-]?\\w+)*(\\.\\w{2,3})+$/.test(value) ||\n                                \"Email address must be a valid address\",\n                            }\n                        })}\n                        />\n                        <Input\n                        label=\"Password: \"\n                        type=\"password\"\n                        placeholder=\"Enter your password\"\n                        {...register(\"password\", {\n                            required: true,})}\n                        />\n                        <Button type=\"submit\" className=\"w-full\">\n                            Create Account\n                        </Button>\n                    </div>\n                </form>\n            </div>\n\n    </div>\n  )\n}\n\nexport default Signup"
  },
  {
    "path": "12MegaBlog/src/components/container/Container.jsx",
    "content": "import React from 'react'\n\nfunction Container({children}) {\n  return <div className='w-full max-w-7xl mx-auto px-4'>{children}</div>;\n  \n}\n\nexport default Container"
  },
  {
    "path": "12MegaBlog/src/components/index.js",
    "content": "import Select from \"./Select\";\nimport Header from \"./Header/Header\";\nimport Footer from \"./Footer/Footer\";\nimport Container from \"./container/Container\";\nimport Logo from \"./Logo\";\nimport LogoutBtn from \"./Header/LogoutBtn\";\nimport RTE from \"./RTE\";\nimport Signup from \"./Signup\";\nimport Login from \"./Login\";\nimport Button from \"./Button\";\nimport PostForm from \"./post-form/PostForm\";\nimport PostCard from \"./PostCard\";\nimport AuthLayout from \"./AuthLayout\";\nimport Input from \"./Input\";\nexport {\n    Header,\n    Footer,\n    Container,\n    Logo,\n    LogoutBtn,\n    RTE,\n    Signup,\n    Login,\n    Button,\n    PostForm,\n    PostCard,\n    AuthLayout, \n    Input,\n    Select,\n}"
  },
  {
    "path": "12MegaBlog/src/components/post-form/PostForm.jsx",
    "content": "import React, { useCallback } from \"react\";\nimport { useForm } from \"react-hook-form\";\nimport { Button, Input, RTE, Select } from \"..\";\nimport appwriteService from \"../../appwrite/config\";\nimport { useNavigate } from \"react-router-dom\";\nimport { useSelector } from \"react-redux\";\n\nexport default function PostForm({ post }) {\n    const { register, handleSubmit, watch, setValue, control, getValues } = useForm({\n        defaultValues: {\n            title: post?.title || \"\",\n            slug: post?.$id || \"\",\n            content: post?.content || \"\",\n            status: post?.status || \"active\",\n        },\n    });\n\n    const navigate = useNavigate();\n    const userData = useSelector((state) => state.auth.userData);\n\n    const submit = async (data) => {\n        if (post) {\n            const file = data.image[0] ? await appwriteService.uploadFile(data.image[0]) : null;\n\n            if (file) {\n                appwriteService.deleteFile(post.featuredImage);\n            }\n\n            const dbPost = await appwriteService.updatePost(post.$id, {\n                ...data,\n                featuredImage: file ? file.$id : undefined,\n            });\n\n            if (dbPost) {\n                navigate(`/post/${dbPost.$id}`);\n            }\n        } else {\n            const file = await appwriteService.uploadFile(data.image[0]);\n\n            if (file) {\n                const fileId = file.$id;\n                data.featuredImage = fileId;\n                const dbPost = await appwriteService.createPost({ ...data, userId: userData.$id });\n\n                if (dbPost) {\n                    navigate(`/post/${dbPost.$id}`);\n                }\n            }\n        }\n    };\n\n    const slugTransform = useCallback((value) => {\n        if (value && typeof value === \"string\")\n            return value\n                .trim()\n                .toLowerCase()\n                .replace(/[^a-zA-Z\\d\\s]+/g, \"-\")\n                .replace(/\\s/g, \"-\");\n\n        return \"\";\n    }, []);\n\n    React.useEffect(() => {\n        const subscription = watch((value, { name }) => {\n            if (name === \"title\") {\n                setValue(\"slug\", slugTransform(value.title), { shouldValidate: true });\n            }\n        });\n\n        return () => subscription.unsubscribe();\n    }, [watch, slugTransform, setValue]);\n\n    return (\n        <form onSubmit={handleSubmit(submit)} className=\"flex flex-wrap\">\n            <div className=\"w-2/3 px-2\">\n                <Input\n                    label=\"Title :\"\n                    placeholder=\"Title\"\n                    className=\"mb-4\"\n                    {...register(\"title\", { required: true })}\n                />\n                <Input\n                    label=\"Slug :\"\n                    placeholder=\"Slug\"\n                    className=\"mb-4\"\n                    {...register(\"slug\", { required: true })}\n                    onInput={(e) => {\n                        setValue(\"slug\", slugTransform(e.currentTarget.value), { shouldValidate: true });\n                    }}\n                />\n                <RTE label=\"Content :\" name=\"content\" control={control} defaultValue={getValues(\"content\")} />\n            </div>\n            <div className=\"w-1/3 px-2\">\n                <Input\n                    label=\"Featured Image :\"\n                    type=\"file\"\n                    className=\"mb-4\"\n                    accept=\"image/png, image/jpg, image/jpeg, image/gif\"\n                    {...register(\"image\", { required: !post })}\n                />\n                {post && (\n                    <div className=\"w-full mb-4\">\n                        <img\n                            src={appwriteService.getFilePreview(post.featuredImage)}\n                            alt={post.title}\n                            className=\"rounded-lg\"\n                        />\n                    </div>\n                )}\n                <Select\n                    options={[\"active\", \"inactive\"]}\n                    label=\"Status\"\n                    className=\"mb-4\"\n                    {...register(\"status\", { required: true })}\n                />\n                <Button type=\"submit\" bgColor={post ? \"bg-green-500\" : undefined} className=\"w-full\">\n                    {post ? \"Update\" : \"Submit\"}\n                </Button>\n            </div>\n        </form>\n    );\n}\n"
  },
  {
    "path": "12MegaBlog/src/conf/conf.js",
    "content": "const conf = {\n    appwriteUrl: String(import.meta.env.VITE_APPWRITE_URL),\n    appwriteProjectId: String(import.meta.env.VITE_APPWRITE_PROJECT_ID),\n    appwriteDatabaseId: String(import.meta.env.VITE_APPWRITE_DATABASE_ID),\n    appwriteCollectionId: String(import.meta.env.VITE_APPWRITE_COLLECTION_ID),\n    appwriteBucketId: String(import.meta.env.VITE_APPWRITE_BUCKET_ID),\n}\n// there was a name issue with the import.meta.env.VITE_APPWRITE_URL, it was later fixed in debugging video\n\nexport default conf"
  },
  {
    "path": "12MegaBlog/src/index.css",
    "content": "@tailwind base;\n@tailwind components;\n@tailwind utilities;"
  },
  {
    "path": "12MegaBlog/src/main.jsx",
    "content": "import React from 'react'\nimport ReactDOM from 'react-dom/client'\nimport App from './App.jsx'\nimport './index.css'\nimport { Provider } from 'react-redux'\nimport store from './store/store.js'\nimport { RouterProvider, createBrowserRouter } from 'react-router-dom'\nimport Home from './pages/Home.jsx'\nimport { AuthLayout, Login } from './components/index.js'\n\n\nimport AddPost from \"./pages/AddPost\";\nimport Signup from './pages/Signup'\nimport EditPost from \"./pages/EditPost\";\n\nimport Post from \"./pages/Post\";\n\nimport AllPosts from \"./pages/AllPosts\";\n\nconst router = createBrowserRouter([\n  {\n    path: \"/\",\n    element: <App />,\n    children: [\n        {\n            path: \"/\",\n            element: <Home />,\n        },\n        {\n            path: \"/login\",\n            element: (\n                <AuthLayout authentication={false}>\n                    <Login />\n                </AuthLayout>\n            ),\n        },\n        {\n            path: \"/signup\",\n            element: (\n                <AuthLayout authentication={false}>\n                    <Signup />\n                </AuthLayout>\n            ),\n        },\n        {\n            path: \"/all-posts\",\n            element: (\n                <AuthLayout authentication>\n                    {\" \"}\n                    <AllPosts />\n                </AuthLayout>\n            ),\n        },\n        {\n            path: \"/add-post\",\n            element: (\n                <AuthLayout authentication>\n                    {\" \"}\n                    <AddPost />\n                </AuthLayout>\n            ),\n        },\n        {\n            path: \"/edit-post/:slug\",\n            element: (\n                <AuthLayout authentication>\n                    {\" \"}\n                    <EditPost />\n                </AuthLayout>\n            ),\n        },\n        {\n            path: \"/post/:slug\",\n            element: <Post />,\n        },\n    ],\n},\n])\n\nReactDOM.createRoot(document.getElementById('root')).render(\n  <React.StrictMode>\n    <Provider store={store}>\n    <RouterProvider router={router}/>\n    </Provider>\n  </React.StrictMode>,\n)\n"
  },
  {
    "path": "12MegaBlog/src/pages/AddPost.jsx",
    "content": "import React from 'react'\nimport { Container, PostForm } from '../components'\n\nfunction AddPost() {\n  return (\n    <div className='py-8'>\n        <Container>\n            <PostForm />\n        </Container>\n    </div>\n  )\n}\n\nexport default AddPost"
  },
  {
    "path": "12MegaBlog/src/pages/AllPosts.jsx",
    "content": "import React, {useState, useEffect} from 'react'\nimport { Container, PostCard } from '../components'\nimport appwriteService from \"../appwrite/config\";\n\nfunction AllPosts() {\n    const [posts, setPosts] = useState([])\n    useEffect(() => {}, [])\n    appwriteService.getPosts([]).then((posts) => {\n        if (posts) {\n            setPosts(posts.documents)\n        }\n    })\n  return (\n    <div className='w-full py-8'>\n        <Container>\n            <div className='flex flex-wrap'>\n                {posts.map((post) => (\n                    <div key={post.$id} className='p-2 w-1/4'>\n                        <PostCard {...post} />\n                    </div>\n                ))}\n            </div>\n            </Container>\n    </div>\n  )\n}\n\nexport default AllPosts"
  },
  {
    "path": "12MegaBlog/src/pages/EditPost.jsx",
    "content": "import React, {useEffect, useState} from 'react'\nimport {Container, PostForm} from '../components'\nimport appwriteService from \"../appwrite/config\";\nimport { useNavigate,  useParams } from 'react-router-dom';\n\nfunction EditPost() {\n    const [post, setPosts] = useState(null)\n    const {slug} = useParams()\n    const navigate = useNavigate()\n\n    useEffect(() => {\n        if (slug) {\n            appwriteService.getPost(slug).then((post) => {\n                if (post) {\n                    setPosts(post)\n                }\n            })\n        } else {\n            navigate('/')\n        }\n    }, [slug, navigate])\n  return post ? (\n    <div className='py-8'>\n        <Container>\n            <PostForm post={post} />\n        </Container>\n    </div>\n  ) : null\n}\n\nexport default EditPost"
  },
  {
    "path": "12MegaBlog/src/pages/Home.jsx",
    "content": "import React, {useEffect, useState} from 'react'\nimport appwriteService from \"../appwrite/config\";\nimport {Container, PostCard} from '../components'\n\nfunction Home() {\n    const [posts, setPosts] = useState([])\n\n    useEffect(() => {\n        appwriteService.getPosts().then((posts) => {\n            if (posts) {\n                setPosts(posts.documents)\n            }\n        })\n    }, [])\n  \n    if (posts.length === 0) {\n        return (\n            <div className=\"w-full py-8 mt-4 text-center\">\n                <Container>\n                    <div className=\"flex flex-wrap\">\n                        <div className=\"p-2 w-full\">\n                            <h1 className=\"text-2xl font-bold hover:text-gray-500\">\n                                Login to read posts\n                            </h1>\n                        </div>\n                    </div>\n                </Container>\n            </div>\n        )\n    }\n    return (\n        <div className='w-full py-8'>\n            <Container>\n                <div className='flex flex-wrap'>\n                    {posts.map((post) => (\n                        <div key={post.$id} className='p-2 w-1/4'>\n                            <PostCard {...post} />\n                        </div>\n                    ))}\n                </div>\n            </Container>\n        </div>\n    )\n}\n\nexport default Home"
  },
  {
    "path": "12MegaBlog/src/pages/Login.jsx",
    "content": "import React from 'react'\nimport { Login as loginComponent } from '../components'\nfunction Login() {\n  return (\n    <div className='py-8'>\n        <loginComponent />\n    </div>\n  )\n}\n\nexport default Login"
  },
  {
    "path": "12MegaBlog/src/pages/Post.jsx",
    "content": "import React, { useEffect, useState } from \"react\";\nimport { Link, useNavigate, useParams } from \"react-router-dom\";\nimport appwriteService from \"../appwrite/config\";\nimport { Button, Container } from \"../components\";\nimport parse from \"html-react-parser\";\nimport { useSelector } from \"react-redux\";\n\nexport default function Post() {\n    const [post, setPost] = useState(null);\n    const { slug } = useParams();\n    const navigate = useNavigate();\n\n    const userData = useSelector((state) => state.auth.userData);\n\n    const isAuthor = post && userData ? post.userId === userData.$id : false;\n\n    useEffect(() => {\n        if (slug) {\n            appwriteService.getPost(slug).then((post) => {\n                if (post) setPost(post);\n                else navigate(\"/\");\n            });\n        } else navigate(\"/\");\n    }, [slug, navigate]);\n\n    const deletePost = () => {\n        appwriteService.deletePost(post.$id).then((status) => {\n            if (status) {\n                appwriteService.deleteFile(post.featuredImage);\n                navigate(\"/\");\n            }\n        });\n    };\n\n    return post ? (\n        <div className=\"py-8\">\n            <Container>\n                <div className=\"w-full flex justify-center mb-4 relative border rounded-xl p-2\">\n                    <img\n                        src={appwriteService.getFilePreview(post.featuredImage)}\n                        alt={post.title}\n                        className=\"rounded-xl\"\n                    />\n\n                    {isAuthor && (\n                        <div className=\"absolute right-6 top-6\">\n                            <Link to={`/edit-post/${post.$id}`}>\n                                <Button bgColor=\"bg-green-500\" className=\"mr-3\">\n                                    Edit\n                                </Button>\n                            </Link>\n                            <Button bgColor=\"bg-red-500\" onClick={deletePost}>\n                                Delete\n                            </Button>\n                        </div>\n                    )}\n                </div>\n                <div className=\"w-full mb-6\">\n                    <h1 className=\"text-2xl font-bold\">{post.title}</h1>\n                </div>\n                <div className=\"browser-css\">\n                    {parse(post.content)}\n                    </div>\n            </Container>\n        </div>\n    ) : null;\n}\n"
  },
  {
    "path": "12MegaBlog/src/pages/Signup.jsx",
    "content": "import React from 'react'\nimport { Signup as SignupComponent } from '../components'\n\nfunction Signup() {\n  return (\n    <div className='py-8'>\n        <SignupComponent />\n    </div>\n  )\n}\n\nexport default Signup"
  },
  {
    "path": "12MegaBlog/src/store/authSlice.js",
    "content": "import { createSlice } from \"@reduxjs/toolkit\";\n\nconst initialState = {\n    status : false,\n    userData: null\n}\n\nconst authSlice = createSlice({\n    name: \"auth\",\n    initialState,\n    reducers: {\n        login: (state, action) => {\n            state.status = true;\n            state.userData = action.payload.userData;\n        },\n        logout: (state) => {\n            state.status = false;\n            state.userData = null;\n        }\n     }\n})\n\nexport const {login, logout} = authSlice.actions;\n\nexport default authSlice.reducer;"
  },
  {
    "path": "12MegaBlog/src/store/store.js",
    "content": "import {configureStore} from '@reduxjs/toolkit';\nimport authSlice from './authSlice';\n\nconst store = configureStore({\n    reducer: {\n        auth : authSlice,\n        //TODO: add more slices here for posts\n    }\n});\n\n\nexport default store;"
  },
  {
    "path": "12MegaBlog/tailwind.config.js",
    "content": "/** @type {import('tailwindcss').Config} */\nexport default {\n  content: [\n    \"./index.html\",\n    \"./src/**/*.{js,ts,jsx,tsx}\",\n  ],\n  theme: {\n    extend: {},\n  },\n  plugins: [],\n}\n\n"
  },
  {
    "path": "12MegaBlog/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport react from '@vitejs/plugin-react'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [react()],\n})\n"
  },
  {
    "path": "contextNotes.md",
    "content": "# Notes for context api\n\n## ThemeBtn UI\n\n```javascript\nexport default function ThemeBtn() {\n    \n\n    return (\n        <label className=\"relative inline-flex items-center cursor-pointer\">\n            <input\n                type=\"checkbox\"\n                value=\"\"\n                className=\"sr-only peer\"\n            />\n            <div className=\"w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 dark:peer-focus:ring-blue-800 rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-blue-600\"></div>\n            <span className=\"ml-3 text-sm font-medium text-gray-900\">Toggle Theme</span>\n        </label>\n    );\n}\n\n\n```\n\n## Card UI\n\n```javascript\nexport default function Card() {\n    return (\n        <div className=\"w-full bg-white border border-gray-200 rounded-lg shadow dark:bg-gray-800 dark:border-gray-700\">\n            <a href=\"/\">\n                <img className=\"p-8 rounded-t-lg\" src=\"https://images.pexels.com/photos/18264716/pexels-photo-18264716/free-photo-of-man-people-laptop-internet.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=2\" alt=\"product_image1\" />\n            </a>\n            <div className=\"px-5 pb-5\">\n                <a href=\"/\">\n                    <h5 className=\"text-xl font-semibold tracking-tight text-gray-900 dark:text-white\">\n                        Apple Watch Series 7 GPS, Aluminium Case, Starlight Sport\n                    </h5>\n                </a>\n                <div className=\"flex items-center mt-2.5 mb-5\">\n                    <svg\n                        className=\"w-4 h-4 text-yellow-300 mr-1\"\n                        aria-hidden=\"true\"\n                        xmlns=\"http://www.w3.org/2000/svg\"\n                        fill=\"currentColor\"\n                        viewBox=\"0 0 22 20\"\n                    >\n                        <path d=\"M20.924 7.625a1.523 1.523 0 0 0-1.238-1.044l-5.051-.734-2.259-4.577a1.534 1.534 0 0 0-2.752 0L7.365 5.847l-5.051.734A1.535 1.535 0 0 0 1.463 9.2l3.656 3.563-.863 5.031a1.532 1.532 0 0 0 2.226 1.616L11 17.033l4.518 2.375a1.534 1.534 0 0 0 2.226-1.617l-.863-5.03L20.537 9.2a1.523 1.523 0 0 0 .387-1.575Z\" />\n                    </svg>\n                    <svg\n                        className=\"w-4 h-4 text-yellow-300 mr-1\"\n                        aria-hidden=\"true\"\n                        xmlns=\"http://www.w3.org/2000/svg\"\n                        fill=\"currentColor\"\n                        viewBox=\"0 0 22 20\"\n                    >\n                        <path d=\"M20.924 7.625a1.523 1.523 0 0 0-1.238-1.044l-5.051-.734-2.259-4.577a1.534 1.534 0 0 0-2.752 0L7.365 5.847l-5.051.734A1.535 1.535 0 0 0 1.463 9.2l3.656 3.563-.863 5.031a1.532 1.532 0 0 0 2.226 1.616L11 17.033l4.518 2.375a1.534 1.534 0 0 0 2.226-1.617l-.863-5.03L20.537 9.2a1.523 1.523 0 0 0 .387-1.575Z\" />\n                    </svg>\n                    <svg\n                        className=\"w-4 h-4 text-yellow-300 mr-1\"\n                        aria-hidden=\"true\"\n                        xmlns=\"http://www.w3.org/2000/svg\"\n                        fill=\"currentColor\"\n                        viewBox=\"0 0 22 20\"\n                    >\n                        <path d=\"M20.924 7.625a1.523 1.523 0 0 0-1.238-1.044l-5.051-.734-2.259-4.577a1.534 1.534 0 0 0-2.752 0L7.365 5.847l-5.051.734A1.535 1.535 0 0 0 1.463 9.2l3.656 3.563-.863 5.031a1.532 1.532 0 0 0 2.226 1.616L11 17.033l4.518 2.375a1.534 1.534 0 0 0 2.226-1.617l-.863-5.03L20.537 9.2a1.523 1.523 0 0 0 .387-1.575Z\" />\n                    </svg>\n                    <svg\n                        className=\"w-4 h-4 text-yellow-300 mr-1\"\n                        aria-hidden=\"true\"\n                        xmlns=\"http://www.w3.org/2000/svg\"\n                        fill=\"currentColor\"\n                        viewBox=\"0 0 22 20\"\n                    >\n                        <path d=\"M20.924 7.625a1.523 1.523 0 0 0-1.238-1.044l-5.051-.734-2.259-4.577a1.534 1.534 0 0 0-2.752 0L7.365 5.847l-5.051.734A1.535 1.535 0 0 0 1.463 9.2l3.656 3.563-.863 5.031a1.532 1.532 0 0 0 2.226 1.616L11 17.033l4.518 2.375a1.534 1.534 0 0 0 2.226-1.617l-.863-5.03L20.537 9.2a1.523 1.523 0 0 0 .387-1.575Z\" />\n                    </svg>\n                    <svg\n                        className=\"w-4 h-4 text-gray-200 dark:text-gray-600\"\n                        aria-hidden=\"true\"\n                        xmlns=\"http://www.w3.org/2000/svg\"\n                        fill=\"currentColor\"\n                        viewBox=\"0 0 22 20\"\n                    >\n                        <path d=\"M20.924 7.625a1.523 1.523 0 0 0-1.238-1.044l-5.051-.734-2.259-4.577a1.534 1.534 0 0 0-2.752 0L7.365 5.847l-5.051.734A1.535 1.535 0 0 0 1.463 9.2l3.656 3.563-.863 5.031a1.532 1.532 0 0 0 2.226 1.616L11 17.033l4.518 2.375a1.534 1.534 0 0 0 2.226-1.617l-.863-5.03L20.537 9.2a1.523 1.523 0 0 0 .387-1.575Z\" />\n                    </svg>\n                    <span className=\"bg-blue-100 text-blue-800 text-xs font-semibold mr-2 px-2.5 py-0.5 rounded dark:bg-blue-200 dark:text-blue-800 ml-3\">\n                        4.0\n                    </span>\n                </div>\n                <div className=\"flex items-center justify-between\">\n                    <span className=\"text-3xl font-bold text-gray-900 dark:text-white\">$599</span>\n                    <a\n                        href=\"/\"\n                        className=\"text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:outline-none focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800\"\n                    >\n                        Add to cart\n                    </a>\n                </div>\n            </div>\n        </div>\n    );\n}\n\n```\n## App UI\n\n```javascript\n\n<div className=\"flex flex-wrap min-h-screen items-center\">\n                <div className=\"w-full\">\n                    <div className=\"w-full max-w-sm mx-auto flex justify-end mb-4\">\n                        \n                    </div>\n\n                    <div className=\"w-full max-w-sm mx-auto\">\n                       \n                    </div>\n                </div>\n            </div>\n\n```\n\n## remember to change config in tailwind\n\n```javascript\n/** @type {import('tailwindcss').Config} */\nexport default {\n  content: [\n    \"./index.html\",\n    \"./src/**/*.{js,ts,jsx,tsx}\",\n  ],\n  darkMode: \"class\",\n  theme: {\n    extend: {},\n  },\n  plugins: [],\n}\n\n\n\n\n```\n\n"
  },
  {
    "path": "currency.md",
    "content": "# notes for currency converter app\n\n## api link\n\n```javascript\nlet url = `https://cdn.jsdelivr.net/gh/fawazahmed0/currency-api@1/latest/currencies/${currency}.json`\n\n```\n\n## input box\n\n```javascript\n\nfunction InputBox({\n    label,\n    \n    className = \"\",\n}) {\n   \n\n    return (\n        <div className={`bg-white p-3 rounded-lg text-sm flex `}>\n            <div className=\"w-1/2\">\n                <label  className=\"text-black/40 mb-2 inline-block\">\n                    label\n                </label>\n                <input\n                    \n                    className=\"outline-none w-full bg-transparent py-1.5\"\n                    type=\"number\"\n                    placeholder=\"Amount\"\n                />\n            </div>\n            <div className=\"w-1/2 flex flex-wrap justify-end text-right\">\n                <p className=\"text-black/40 mb-2 w-full\">Currency Type</p>\n                <select\n                    className=\"rounded-lg px-1 py-1 bg-gray-100 cursor-pointer outline-none\"\n                    \n                >\n                    \n                        <option value=\"usd\">\n                            usd\n                        </option>\n                \n                </select>\n            </div>\n        </div>\n    );\n}\n\nexport default InputBox;\n\n```\n\n\n## app js\n\n```javascript\nfunction App() {\n    \n\n    return (\n        <div\n            className=\"w-full h-screen flex flex-wrap justify-center items-center bg-cover bg-no-repeat\"\n            style={{\n                backgroundImage: `url('${BackgroundImage}')`,\n            }}\n        >\n            <div className=\"w-full\">\n                <div className=\"w-full max-w-md mx-auto border border-gray-60 rounded-lg p-5 backdrop-blur-sm bg-white/30\">\n                    <form\n                        onSubmit={(e) => {\n                            e.preventDefault();\n                           \n                        }}\n                    >\n                        <div className=\"w-full mb-1\">\n                            <InputBox\n                                label=\"From\"\n                                \n                            />\n                        </div>\n                        <div className=\"relative w-full h-0.5\">\n                            <button\n                                type=\"button\"\n                                className=\"absolute left-1/2 -translate-x-1/2 -translate-y-1/2 border-2 border-white rounded-md bg-blue-600 text-white px-2 py-0.5\"\n                                \n                            >\n                                swap\n                            </button>\n                        </div>\n                        <div className=\"w-full mt-1 mb-4\">\n                            <InputBox\n                                label=\"To\"\n                                \n                            />\n                        </div>\n                        <button type=\"submit\" className=\"w-full bg-blue-600 text-white px-4 py-3 rounded-lg\">\n                            Convert \n                        </button>\n                    </form>\n                </div>\n            </div>\n        </div>\n    );\n\n```"
  },
  {
    "path": "customReact/customreact.js",
    "content": "function customRender(reactElement, container){\n    /*\n    const domElement = document.createElement(reactElement.type)\n    domElement.innerHTML = reactElement.children\n    domElement.setAttribute('href', reactElement.props.href)\n    domElement.setAttribute('target', reactElement.props.target)\n\n    container.appendChild(domElement)\n    */\n\n    const domElement = document.createElement(reactElement.type)\n    domElement.innerHTML = reactElement.children\n    for (const prop in reactElement.props) {\n        if (prop === 'children') continue;\n        domElement.setAttribute(prop, reactElement.props[prop])\n    }\n    container.appendChild(domElement)\n}\n\nconst reactElement = {\n    type: 'a',\n    props: {\n        href: 'https://google.com',\n        target: '_blank'\n    },\n    children: 'Click me to visit google'\n}\n\nconst mainContainer = document.querySelector('#root')\n\ncustomRender(reactElement, mainContainer)"
  },
  {
    "path": "customReact/index.html",
    "content": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <title>Custom React App</title>\n</head>\n<body>\n    <div id=\"root\"></div>\n    <script src=\"./customreact.js\"></script>\n</body>\n</html>"
  },
  {
    "path": "interview-discussion/.eslintrc.cjs",
    "content": "module.exports = {\n  root: true,\n  env: { browser: true, es2020: true },\n  extends: [\n    'eslint:recommended',\n    'plugin:react/recommended',\n    'plugin:react/jsx-runtime',\n    'plugin:react-hooks/recommended',\n  ],\n  ignorePatterns: ['dist', '.eslintrc.cjs'],\n  parserOptions: { ecmaVersion: 'latest', sourceType: 'module' },\n  settings: { react: { version: '18.2' } },\n  plugins: ['react-refresh'],\n  rules: {\n    'react-refresh/only-export-components': [\n      'warn',\n      { allowConstantExport: true },\n    ],\n  },\n}\n"
  },
  {
    "path": "interview-discussion/.gitignore",
    "content": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npnpm-debug.log*\nlerna-debug.log*\n\nnode_modules\ndist\ndist-ssr\n*.local\n\n# Editor directories and files\n.vscode/*\n!.vscode/extensions.json\n.idea\n.DS_Store\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n*.sw?\n"
  },
  {
    "path": "interview-discussion/README.md",
    "content": "# React + Vite\n\nThis template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.\n\nCurrently, two official plugins are available:\n\n- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh\n- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh\n"
  },
  {
    "path": "interview-discussion/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <link rel=\"icon\" type=\"image/svg+xml\" href=\"/vite.svg\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite + React</title>\n  </head>\n  <body>\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.jsx\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "interview-discussion/package.json",
    "content": "{\n  \"name\": \"interview-discussion\",\n  \"private\": true,\n  \"version\": \"0.0.0\",\n  \"type\": \"module\",\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"lint\": \"eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0\",\n    \"preview\": \"vite preview\"\n  },\n  \"dependencies\": {\n    \"react\": \"^18.2.0\",\n    \"react-dom\": \"^18.2.0\"\n  },\n  \"devDependencies\": {\n    \"@types/react\": \"^18.2.15\",\n    \"@types/react-dom\": \"^18.2.7\",\n    \"@vitejs/plugin-react\": \"^4.0.3\",\n    \"eslint\": \"^8.45.0\",\n    \"eslint-plugin-react\": \"^7.32.2\",\n    \"eslint-plugin-react-hooks\": \"^4.6.0\",\n    \"eslint-plugin-react-refresh\": \"^0.4.3\",\n    \"vite\": \"^4.4.5\"\n  }\n}\n"
  },
  {
    "path": "interview-discussion/src/App.css",
    "content": "#root {\n  max-width: 1280px;\n  margin: 0 auto;\n  padding: 2rem;\n  text-align: center;\n}\n\n.logo {\n  height: 6em;\n  padding: 1.5em;\n  will-change: filter;\n  transition: filter 300ms;\n}\n.logo:hover {\n  filter: drop-shadow(0 0 2em #646cffaa);\n}\n.logo.react:hover {\n  filter: drop-shadow(0 0 2em #61dafbaa);\n}\n\n@keyframes logo-spin {\n  from {\n    transform: rotate(0deg);\n  }\n  to {\n    transform: rotate(360deg);\n  }\n}\n\n@media (prefers-reduced-motion: no-preference) {\n  a:nth-of-type(2) .logo {\n    animation: logo-spin infinite 20s linear;\n  }\n}\n\n.card {\n  padding: 2em;\n}\n\n.read-the-docs {\n  color: #888;\n}\n"
  },
  {
    "path": "interview-discussion/src/App.jsx",
    "content": "import { useState } from 'react'\nimport reactLogo from './assets/react.svg'\nimport viteLogo from '/vite.svg'\nimport './App.css'\nimport { useEffect } from 'react'\n\nfunction App() {\n  console.log(\"App rendered\", Math.random());\n  const [value, setValue] = useState({\n    value: 0,\n  })\n  \n  \n  //const [multipliedValue, setMultipliedValue] = useState(1)\n  //let multipliedValue = value * 5\n\n  // const multiplybyfive = () => {\n  //   //setMultipliedValue(value * 5)\n  //   setValue(value + 1)\n  // }\n\n  const clickMe = () => {\n    setValue({\n      value: 0,\n    })\n  }\n\n\n  \n  \n\n  return (\n    <>\n      <h1>Main value: {value.value} </h1>\n      <button\n      onClick={clickMe}\n      >Click to multiply by 5</button>\n      {/* <h2>Multiplied value: {multipliedValue} </h2> */}\n    </>\n  )\n}\n\nexport default App\n"
  },
  {
    "path": "interview-discussion/src/index.css",
    "content": ":root {\n  font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;\n  line-height: 1.5;\n  font-weight: 400;\n\n  color-scheme: light dark;\n  color: rgba(255, 255, 255, 0.87);\n  background-color: #242424;\n\n  font-synthesis: none;\n  text-rendering: optimizeLegibility;\n  -webkit-font-smoothing: antialiased;\n  -moz-osx-font-smoothing: grayscale;\n  -webkit-text-size-adjust: 100%;\n}\n\na {\n  font-weight: 500;\n  color: #646cff;\n  text-decoration: inherit;\n}\na:hover {\n  color: #535bf2;\n}\n\nbody {\n  margin: 0;\n  display: flex;\n  place-items: center;\n  min-width: 320px;\n  min-height: 100vh;\n}\n\nh1 {\n  font-size: 3.2em;\n  line-height: 1.1;\n}\n\nbutton {\n  border-radius: 8px;\n  border: 1px solid transparent;\n  padding: 0.6em 1.2em;\n  font-size: 1em;\n  font-weight: 500;\n  font-family: inherit;\n  background-color: #1a1a1a;\n  cursor: pointer;\n  transition: border-color 0.25s;\n}\nbutton:hover {\n  border-color: #646cff;\n}\nbutton:focus,\nbutton:focus-visible {\n  outline: 4px auto -webkit-focus-ring-color;\n}\n\n@media (prefers-color-scheme: light) {\n  :root {\n    color: #213547;\n    background-color: #ffffff;\n  }\n  a:hover {\n    color: #747bff;\n  }\n  button {\n    background-color: #f9f9f9;\n  }\n}\n"
  },
  {
    "path": "interview-discussion/src/main.jsx",
    "content": "import React from 'react'\nimport ReactDOM from 'react-dom/client'\nimport App from './App.jsx'\nimport './index.css'\n\nReactDOM.createRoot(document.getElementById('root')).render(\n  <React.StrictMode>\n    <App />\n  </React.StrictMode>,\n)\n"
  },
  {
    "path": "interview-discussion/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport react from '@vitejs/plugin-react'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [react()],\n})\n"
  },
  {
    "path": "reactRouterNotes.md",
    "content": "# all raw html css file for react router video\n\n## header component\n\n```javascript\nexport default function Header() {\n    return (\n        <header className=\"shadow sticky z-50 top-0\">\n            <nav className=\"bg-white border-gray-200 px-4 lg:px-6 py-2.5\">\n                <div className=\"flex flex-wrap justify-between items-center mx-auto max-w-screen-xl\">\n                    <Link to=\"/\" className=\"flex items-center\">\n                        <img\n                            src=\"https://alexharkness.com/wp-content/uploads/2020/06/logo-2.png\"\n                            className=\"mr-3 h-12\"\n                            alt=\"Logo\"\n                        />\n                    </Link>\n                    <div className=\"flex items-center lg:order-2\">\n                        <Link\n                            to=\"#\"\n                            className=\"text-gray-800 hover:bg-gray-50 focus:ring-4 focus:ring-gray-300 font-medium rounded-lg text-sm px-4 lg:px-5 py-2 lg:py-2.5 mr-2 focus:outline-none\"\n                        >\n                            Log in\n                        </Link>\n                        <Link\n                            to=\"#\"\n                            className=\"text-white bg-orange-700 hover:bg-orange-800 focus:ring-4 focus:ring-orange-300 font-medium rounded-lg text-sm px-4 lg:px-5 py-2 lg:py-2.5 mr-2 focus:outline-none\"\n                        >\n                            Get started\n                        </Link>\n                    </div>\n                    <div\n                        className=\"hidden justify-between items-center w-full lg:flex lg:w-auto lg:order-1\"\n                        id=\"mobile-menu-2\"\n                    >\n                        <ul className=\"flex flex-col mt-4 font-medium lg:flex-row lg:space-x-8 lg:mt-0\">\n                            <li>\n                                <NavLink\n                                    className={() =>\n                                        `block py-2 pr-4 pl-3 duration-200 border-b border-gray-100 hover:bg-gray-50 lg:hover:bg-transparent lg:border-0 hover:text-orange-700 lg:p-0`\n                                    }\n                                >\n                                    Home\n                                </NavLink>\n                            </li>\n                            \n                            \n                        </ul>\n                    </div>\n                </div>\n            </nav>\n        </header>\n    );\n}\n\n\n```\n\n\n## Footer component\n\n```javascript\nexport default function Footer() {\n    return (\n        <footer className=\"bg-white border-y\">\n            <div className=\"mx-auto w-full max-w-screen-xl p-4 py-6 lg:py-8\">\n                <div className=\"md:flex md:justify-between\">\n                    <div className=\"mb-6 md:mb-0\">\n                        <Link to=\"/\" className=\"flex items-center\">\n                            <img\n                                src=\"https://alexharkness.com/wp-content/uploads/2020/06/logo-2.png\"\n                                className=\"mr-3 h-16\"\n                                alt=\"Logo\"\n                            />\n                        </Link>\n                    </div>\n                    <div className=\"grid grid-cols-2 gap-8 sm:gap-6 sm:grid-cols-3\">\n                        <div>\n                            <h2 className=\"mb-6 text-sm font-semibold text-gray-900 uppercase\">Resources</h2>\n                            <ul className=\"text-gray-500 font-medium\">\n                                <li className=\"mb-4\">\n                                    <Link to=\"/\" className=\"hover:underline\">\n                                        Home\n                                    </Link>\n                                </li>\n                                <li>\n                                    <Link to=\"/about\" className=\"hover:underline\">\n                                        About\n                                    </Link>\n                                </li>\n                            </ul>\n                        </div>\n                        <div>\n                            <h2 className=\"mb-6 text-sm font-semibold text-gray-900 uppercase\">Follow us</h2>\n                            <ul className=\"text-gray-500 font-medium\">\n                                <li className=\"mb-4\">\n                                    <a\n                                        href=\"https://github.com/hiteshchoudhary\"\n                                        className=\"hover:underline\"\n                                        target=\"_blank\"\n                                        rel=\"noreferrer\"\n                                    >\n                                        Github\n                                    </a>\n                                </li>\n                                <li>\n                                    <Link to=\"/\" className=\"hover:underline\">\n                                        Discord\n                                    </Link>\n                                </li>\n                            </ul>\n                        </div>\n                        <div>\n                            <h2 className=\"mb-6 text-sm font-semibold text-gray-900 uppercase\">Legal</h2>\n                            <ul className=\"text-gray-500 font-medium\">\n                                <li className=\"mb-4\">\n                                    <Link to=\"#\" className=\"hover:underline\">\n                                        Privacy Policy\n                                    </Link>\n                                </li>\n                                <li>\n                                    <Link to=\"#\" className=\"hover:underline\">\n                                        Terms &amp; Conditions\n                                    </Link>\n                                </li>\n                            </ul>\n                        </div>\n                    </div>\n                </div>\n                <hr className=\"my-6 border-gray-200 sm:mx-auto lg:my-8\" />\n                <div className=\"sm:flex sm:items-center sm:justify-between\">\n                    <span className=\"text-sm text-gray-500 sm:text-center\">\n                        © 2023\n                        <a href=\"https://hiteshchoudhary.com/\" className=\"hover:underline\">\n                            hiteshchoudhary\n                        </a>\n                        . All Rights Reserved.\n                    </span>\n                    <div className=\"flex mt-4 space-x-5 sm:justify-center sm:mt-0\">\n                        <Link to=\"#\" className=\"text-gray-500 hover:text-gray-900\">\n                            <svg\n                                className=\"w-4 h-4\"\n                                aria-hidden=\"true\"\n                                xmlns=\"http://www.w3.org/2000/svg\"\n                                fill=\"currentColor\"\n                                viewBox=\"0 0 8 19\"\n                            >\n                                <path\n                                    fill-rule=\"evenodd\"\n                                    d=\"M6.135 3H8V0H6.135a4.147 4.147 0 0 0-4.142 4.142V6H0v3h2v9.938h3V9h2.021l.592-3H5V3.591A.6.6 0 0 1 5.592 3h.543Z\"\n                                    clip-rule=\"evenodd\"\n                                />\n                            </svg>\n                            <span className=\"sr-only\">Facebook page</span>\n                        </Link>\n                        <Link to=\"#\" className=\"text-gray-500\">\n                            <svg\n                                className=\"w-4 h-4\"\n                                aria-hidden=\"true\"\n                                xmlns=\"http://www.w3.org/2000/svg\"\n                                fill=\"currentColor\"\n                                viewBox=\"0 0 21 16\"\n                            >\n                                <path d=\"M16.942 1.556a16.3 16.3 0 0 0-4.126-1.3 12.04 12.04 0 0 0-.529 1.1 15.175 15.175 0 0 0-4.573 0 11.585 11.585 0 0 0-.535-1.1 16.274 16.274 0 0 0-4.129 1.3A17.392 17.392 0 0 0 .182 13.218a15.785 15.785 0 0 0 4.963 2.521c.41-.564.773-1.16 1.084-1.785a10.63 10.63 0 0 1-1.706-.83c.143-.106.283-.217.418-.33a11.664 11.664 0 0 0 10.118 0c.137.113.277.224.418.33-.544.328-1.116.606-1.71.832a12.52 12.52 0 0 0 1.084 1.785 16.46 16.46 0 0 0 5.064-2.595 17.286 17.286 0 0 0-2.973-11.59ZM6.678 10.813a1.941 1.941 0 0 1-1.8-2.045 1.93 1.93 0 0 1 1.8-2.047 1.919 1.919 0 0 1 1.8 2.047 1.93 1.93 0 0 1-1.8 2.045Zm6.644 0a1.94 1.94 0 0 1-1.8-2.045 1.93 1.93 0 0 1 1.8-2.047 1.918 1.918 0 0 1 1.8 2.047 1.93 1.93 0 0 1-1.8 2.045Z\" />\n                            </svg>\n                            <span className=\"sr-only\">Discord community</span>\n                        </Link>\n                        <Link to=\"#\" className=\"text-gray-500\">\n                            <svg\n                                className=\"w-4 h-4\"\n                                aria-hidden=\"true\"\n                                xmlns=\"http://www.w3.org/2000/svg\"\n                                fill=\"currentColor\"\n                                viewBox=\"0 0 20 17\"\n                            >\n                                <path\n                                    fill-rule=\"evenodd\"\n                                    d=\"M20 1.892a8.178 8.178 0 0 1-2.355.635 4.074 4.074 0 0 0 1.8-2.235 8.344 8.344 0 0 1-2.605.98A4.13 4.13 0 0 0 13.85 0a4.068 4.068 0 0 0-4.1 4.038 4 4 0 0 0 .105.919A11.705 11.705 0 0 1 1.4.734a4.006 4.006 0 0 0 1.268 5.392 4.165 4.165 0 0 1-1.859-.5v.05A4.057 4.057 0 0 0 4.1 9.635a4.19 4.19 0 0 1-1.856.07 4.108 4.108 0 0 0 3.831 2.807A8.36 8.36 0 0 1 0 14.184 11.732 11.732 0 0 0 6.291 16 11.502 11.502 0 0 0 17.964 4.5c0-.177 0-.35-.012-.523A8.143 8.143 0 0 0 20 1.892Z\"\n                                    clip-rule=\"evenodd\"\n                                />\n                            </svg>\n                            <span className=\"sr-only\">Twitter page</span>\n                        </Link>\n                        <Link to=\"#\" className=\"text-gray-500\">\n                            <svg\n                                className=\"w-4 h-4\"\n                                aria-hidden=\"true\"\n                                xmlns=\"http://www.w3.org/2000/svg\"\n                                fill=\"currentColor\"\n                                viewBox=\"0 0 20 20\"\n                            >\n                                <path\n                                    fill-rule=\"evenodd\"\n                                    d=\"M10 .333A9.911 9.911 0 0 0 6.866 19.65c.5.092.678-.215.678-.477 0-.237-.01-1.017-.014-1.845-2.757.6-3.338-1.169-3.338-1.169a2.627 2.627 0 0 0-1.1-1.451c-.9-.615.07-.6.07-.6a2.084 2.084 0 0 1 1.518 1.021 2.11 2.11 0 0 0 2.884.823c.044-.503.268-.973.63-1.325-2.2-.25-4.516-1.1-4.516-4.9A3.832 3.832 0 0 1 4.7 7.068a3.56 3.56 0 0 1 .095-2.623s.832-.266 2.726 1.016a9.409 9.409 0 0 1 4.962 0c1.89-1.282 2.717-1.016 2.717-1.016.366.83.402 1.768.1 2.623a3.827 3.827 0 0 1 1.02 2.659c0 3.807-2.319 4.644-4.525 4.889a2.366 2.366 0 0 1 .673 1.834c0 1.326-.012 2.394-.012 2.72 0 .263.18.572.681.475A9.911 9.911 0 0 0 10 .333Z\"\n                                    clip-rule=\"evenodd\"\n                                />\n                            </svg>\n                            <span className=\"sr-only\">GitHub account</span>\n                        </Link>\n                        <Link to=\"#\" className=\"text-gray-500\">\n                            <svg\n                                className=\"w-4 h-4\"\n                                aria-hidden=\"true\"\n                                xmlns=\"http://www.w3.org/2000/svg\"\n                                fill=\"currentColor\"\n                                viewBox=\"0 0 20 20\"\n                            >\n                                <path\n                                    fill-rule=\"evenodd\"\n                                    d=\"M10 0a10 10 0 1 0 10 10A10.009 10.009 0 0 0 10 0Zm6.613 4.614a8.523 8.523 0 0 1 1.93 5.32 20.094 20.094 0 0 0-5.949-.274c-.059-.149-.122-.292-.184-.441a23.879 23.879 0 0 0-.566-1.239 11.41 11.41 0 0 0 4.769-3.366ZM8 1.707a8.821 8.821 0 0 1 2-.238 8.5 8.5 0 0 1 5.664 2.152 9.608 9.608 0 0 1-4.476 3.087A45.758 45.758 0 0 0 8 1.707ZM1.642 8.262a8.57 8.57 0 0 1 4.73-5.981A53.998 53.998 0 0 1 9.54 7.222a32.078 32.078 0 0 1-7.9 1.04h.002Zm2.01 7.46a8.51 8.51 0 0 1-2.2-5.707v-.262a31.64 31.64 0 0 0 8.777-1.219c.243.477.477.964.692 1.449-.114.032-.227.067-.336.1a13.569 13.569 0 0 0-6.942 5.636l.009.003ZM10 18.556a8.508 8.508 0 0 1-5.243-1.8 11.717 11.717 0 0 1 6.7-5.332.509.509 0 0 1 .055-.02 35.65 35.65 0 0 1 1.819 6.476 8.476 8.476 0 0 1-3.331.676Zm4.772-1.462A37.232 37.232 0 0 0 13.113 11a12.513 12.513 0 0 1 5.321.364 8.56 8.56 0 0 1-3.66 5.73h-.002Z\"\n                                    clip-rule=\"evenodd\"\n                                />\n                            </svg>\n                            <span className=\"sr-only\">Dribbble account</span>\n                        </Link>\n                    </div>\n                </div>\n            </div>\n        </footer>\n    );\n}\n\n```\n\n\n## Home component\n\n```javascript\nexport default function Home() {\n    return (\n        <div className=\"mx-auto w-full max-w-7xl\">\n            <aside className=\"relative overflow-hidden text-black rounded-lg sm:mx-16 mx-2 sm:py-16\">\n                <div className=\"relative z-10 max-w-screen-xl px-4  pb-20 pt-10 sm:py-24 mx-auto sm:px-6 lg:px-8\">\n                    <div className=\"max-w-xl sm:mt-1 mt-80 space-y-8 text-center sm:text-right sm:ml-auto\">\n                        <h2 className=\"text-4xl font-bold sm:text-5xl\">\n                            Download Now\n                            <span className=\"hidden sm:block text-4xl\">Lorem Ipsum</span>\n                        </h2>\n\n                        <Link\n                            className=\"inline-flex text-white items-center px-6 py-3 font-medium bg-orange-700 rounded-lg hover:opacity-75\"\n                            to=\"/\"\n                        >\n                            <svg\n                                fill=\"white\"\n                                width=\"24\"\n                                height=\"24\"\n                                xmlns=\"http://www.w3.org/2000/svg\"\n                                fillRule=\"evenodd\"\n                                clipRule=\"evenodd\"\n                            >\n                                <path d=\"M1.571 23.664l10.531-10.501 3.712 3.701-12.519 6.941c-.476.264-1.059.26-1.532-.011l-.192-.13zm9.469-11.56l-10.04 10.011v-20.022l10.04 10.011zm6.274-4.137l4.905 2.719c.482.268.781.77.781 1.314s-.299 1.046-.781 1.314l-5.039 2.793-4.015-4.003 4.149-4.137zm-15.854-7.534c.09-.087.191-.163.303-.227.473-.271 1.056-.275 1.532-.011l12.653 7.015-3.846 3.835-10.642-10.612z\" />\n                            </svg>\n                            &nbsp; Download now\n                        </Link>\n                    </div>\n                </div>\n\n                <div className=\"absolute inset-0 w-full sm:my-20 sm:pt-1 pt-12 h-full \">\n                    <img className=\"w-96\" src=\"https://i.ibb.co/5BCcDYB/Remote2.png\" alt=\"image1\" />\n                </div>\n            </aside>\n\n            <div className=\"grid  place-items-center sm:mt-20\">\n                <img className=\"sm:w-96 w-48\" src=\"https://i.ibb.co/2M7rtLk/Remote1.png\" alt=\"image2\" />\n            </div>\n\n            <h1 className=\"text-center text-2xl sm:text-5xl py-10 font-medium\">Lorem Ipsum Yojo</h1>\n        </div>\n    );\n}\n\n```\n\n## About us component\n\n```javascript\nexport default function About() {\n    return (\n        <div className=\"py-16 bg-white\">\n            <div className=\"container m-auto px-6 text-gray-600 md:px-12 xl:px-6\">\n                <div className=\"space-y-6 md:space-y-0 md:flex md:gap-6 lg:items-center lg:gap-12\">\n                    <div className=\"md:5/12 lg:w-5/12\">\n                        <img\n                            src=\"https://tailus.io/sources/blocks/left-image/preview/images/startup.png\"\n                            alt=\"image\"\n                        />\n                    </div>\n                    <div className=\"md:7/12 lg:w-6/12\">\n                        <h2 className=\"text-2xl text-gray-900 font-bold md:text-4xl\">\n                            React development is carried out by passionate developers\n                        </h2>\n                        <p className=\"mt-6 text-gray-600\">\n                            Lorem ipsum dolor, sit amet consectetur adipisicing elit. Eum omnis voluptatem\n                            accusantium nemo perspiciatis delectus atque autem! Voluptatum tenetur beatae unde\n                            aperiam, repellat expedita consequatur! Officiis id consequatur atque doloremque!\n                        </p>\n                        <p className=\"mt-4 text-gray-600\">\n                            Nobis minus voluptatibus pariatur dignissimos libero quaerat iure expedita at?\n                            Asperiores nemo possimus nesciunt dicta veniam aspernatur quam mollitia.\n                        </p>\n                    </div>\n                </div>\n            </div>\n        </div>\n    );\n}\n```\n\n## Contact us Component\n\n```javascript\nexport default function Contact() {\n    return (\n        <div className=\"relative flex items-top justify-center min-h-[700px] bg-white sm:items-center sm:pt-0\">\n            <div className=\"max-w-6xl mx-auto sm:px-6 lg:px-8\">\n                <div className=\"mt-8 overflow-hidden\">\n                    <div className=\"grid grid-cols-1 md:grid-cols-2\">\n                        <div className=\"p-6 mr-2 bg-gray-100 sm:rounded-lg\">\n                            <h1 className=\"text-3xl sm:text-4xl text-gray-800 font-extrabold tracking-tight\">\n                                Get in touch: \n                            </h1>\n                            <p className=\"text-normal text-lg sm:text-xl font-medium text-gray-600 mt-2\">\n                                Fill in the form to start a conversation\n                            </p>\n\n                            <div className=\"flex items-center mt-8 text-gray-600\">\n                                <svg\n                                    fill=\"none\"\n                                    stroke=\"currentColor\"\n                                    stroke-linecap=\"round\"\n                                    stroke-linejoin=\"round\"\n                                    stroke-width=\"1.5\"\n                                    viewBox=\"0 0 24 24\"\n                                    className=\"w-8 h-8 text-gray-500\"\n                                >\n                                    <path\n                                        stroke-linecap=\"round\"\n                                        stroke-linejoin=\"round\"\n                                        stroke-width=\"1.5\"\n                                        d=\"M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z\"\n                                    />\n                                    <path\n                                        stroke-linecap=\"round\"\n                                        stroke-linejoin=\"round\"\n                                        stroke-width=\"1.5\"\n                                        d=\"M15 11a3 3 0 11-6 0 3 3 0 016 0z\"\n                                    />\n                                </svg>\n                                <div className=\"ml-4 text-md tracking-wide font-semibold w-40\">\n                                    Acme Inc, Street, State, Postal Code\n                                </div>\n                            </div>\n\n                            <div className=\"flex items-center mt-4 text-gray-600\">\n                                <svg\n                                    fill=\"none\"\n                                    stroke=\"currentColor\"\n                                    stroke-linecap=\"round\"\n                                    stroke-linejoin=\"round\"\n                                    stroke-width=\"1.5\"\n                                    viewBox=\"0 0 24 24\"\n                                    className=\"w-8 h-8 text-gray-500\"\n                                >\n                                    <path\n                                        stroke-linecap=\"round\"\n                                        stroke-linejoin=\"round\"\n                                        stroke-width=\"1.5\"\n                                        d=\"M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z\"\n                                    />\n                                </svg>\n                                <div className=\"ml-4 text-md tracking-wide font-semibold w-40\">\n                                    +44 1234567890\n                                </div>\n                            </div>\n\n                            <div className=\"flex items-center mt-2 text-gray-600\">\n                                <svg\n                                    fill=\"none\"\n                                    stroke=\"currentColor\"\n                                    stroke-linecap=\"round\"\n                                    stroke-linejoin=\"round\"\n                                    stroke-width=\"1.5\"\n                                    viewBox=\"0 0 24 24\"\n                                    className=\"w-8 h-8 text-gray-500\"\n                                >\n                                    <path\n                                        stroke-linecap=\"round\"\n                                        stroke-linejoin=\"round\"\n                                        stroke-width=\"1.5\"\n                                        d=\"M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z\"\n                                    />\n                                </svg>\n                                <div className=\"ml-4 text-md tracking-wide font-semibold w-40\">\n                                    info@acme.org\n                                </div>\n                            </div>\n                        </div>\n\n                        <form className=\"p-6 flex flex-col justify-center\">\n                            <div className=\"flex flex-col\">\n                                <label for=\"name\" className=\"hidden\">\n                                    Full Name\n                                </label>\n                                <input\n                                    type=\"name\"\n                                    name=\"name\"\n                                    id=\"name\"\n                                    placeholder=\"Full Name\"\n                                    className=\"w-100 mt-2 py-3 px-3 rounded-lg bg-white border border-gray-400 text-gray-800 font-semibold focus:border-orange-500 focus:outline-none\"\n                                />\n                            </div>\n\n                            <div className=\"flex flex-col mt-2\">\n                                <label for=\"email\" className=\"hidden\">\n                                    Email\n                                </label>\n                                <input\n                                    type=\"email\"\n                                    name=\"email\"\n                                    id=\"email\"\n                                    placeholder=\"Email\"\n                                    className=\"w-100 mt-2 py-3 px-3 rounded-lg bg-white border border-gray-400 text-gray-800 font-semibold focus:border-orange-500 focus:outline-none\"\n                                />\n                            </div>\n\n                            <div className=\"flex flex-col mt-2\">\n                                <label for=\"tel\" className=\"hidden\">\n                                    Number\n                                </label>\n                                <input\n                                    type=\"tel\"\n                                    name=\"tel\"\n                                    id=\"tel\"\n                                    placeholder=\"Telephone Number\"\n                                    className=\"w-100 mt-2 py-3 px-3 rounded-lg bg-white border border-gray-400 text-gray-800 font-semibold focus:border-orange-500 focus:outline-none\"\n                                />\n                            </div>\n\n                            <button\n                                type=\"submit\"\n                                className=\"md:w-32 bg-orange-700 hover:bg-blue-dark text-white font-bold py-3 px-6 rounded-lg mt-3 hover:bg-orange-600 transition ease-in-out duration-300\"\n                            >\n                                Submit\n                            </button>\n                        </form>\n                    </div>\n                </div>\n            </div>\n        </div>\n    );\n}\n\n```\n\n\n"
  },
  {
    "path": "readme.md",
    "content": "# ReactJS In-Depth Tutorial Series\n\nWelcome to the comprehensive repository dedicated to teaching ReactJS in depth. This series covers not just the basics but dives deep into the intricacies of ReactJS to ensure that you emerge with a solid foundation and deep understanding of the most popular frontend library in the world.\n\n## 🌟 Features\n\n- **In-Depth Explanations**: Each concept is broken down for easier understanding and comprehensive learning.\n- **Project-Based Learning**: Multiple projects to ensure that your theoretical knowledge is supplemented with practical experience.\n- **Free Video Series**: All lessons are available in video format on our YouTube channel \"chai aur code\".\n\n## 🚀 Getting Started\n\n1. Clone this repository:\n   ```bash\n   git clone https://github.com/hiteshchoudhary/chai-aur-react.git\n   ```\n\n2. Navigate to each project folder and follow the instructions in the respective README to set up and run the project.\n\n3. Parallelly, watch the video lessons on the [\"chai aur code\" YouTube channel](https://www.youtube.com/channel/UCNQ6FEtztATuaVhZKCY28Yw) for a detailed walk-through.\n\n## 📚 Modules & Projects\n\n1. **React JS RoadMap**:\n   \n   - [Watch Lesson](https://www.youtube.com/watch?v=vz1RlUyrc3w&list=PLu71SKxNbfoDqgPchmvIsL4hTnJIrtige)\n\n2. **Create react projects**:\n   - [Watch Lesson](https://www.youtube.com/watch?v=k3KqQvywToE&list=PLu71SKxNbfoDqgPchmvIsL4hTnJIrtige&index=2)\n\n3. **Understand the react flow and structure**:\n   - [Watch Lesson](https://www.youtube.com/watch?v=yNbnA5pryMg&list=PLu71SKxNbfoDqgPchmvIsL4hTnJIrtige&index=3)\n4. **Create your own react library and JSX**:\n   - [Watch Lesson](https://www.youtube.com/watch?v=kAOuj6o7Kxs&list=PLu71SKxNbfoDqgPchmvIsL4hTnJIrtige&index=4)\n\n... _(on going series)_\n\n## 📖 Additional Resources\n\n- [Official React Documentation](https://reactjs.org/docs/getting-started.html)\n- [React Community Support on Discord](https://hitesh.ai/discord)\n\n## 💼 Contribution\n\nContributions are always welcomed. Feel free to raise issues or send in pull requests. Please do not update the existing code as users when they watch videos, they expect same code in repo.\n\n## 📺 \"chai aur code\" on YouTube\n\nDon't forget to subscribe to [\"chai aur code\"](https://www.youtube.com/channel/UCNQ6FEtztATuaVhZKCY28Yw) on YouTube for the entire video series and much more!\n\n## 🙏 Acknowledgements\n\nA big thank you to the React community, Open Source contributors, and all the students and professionals who've provided their feedback and support to make this series better!\n\n---\n\n**Happy Learning!** ✨\n\n---\n\n_Made with ☕️ by HiteshChoudhary_"
  },
  {
    "path": "reduxToolkitTodo/.eslintrc.cjs",
    "content": "module.exports = {\n  root: true,\n  env: { browser: true, es2020: true },\n  extends: [\n    'eslint:recommended',\n    'plugin:react/recommended',\n    'plugin:react/jsx-runtime',\n    'plugin:react-hooks/recommended',\n  ],\n  ignorePatterns: ['dist', '.eslintrc.cjs'],\n  parserOptions: { ecmaVersion: 'latest', sourceType: 'module' },\n  settings: { react: { version: '18.2' } },\n  plugins: ['react-refresh'],\n  rules: {\n    'react-refresh/only-export-components': [\n      'warn',\n      { allowConstantExport: true },\n    ],\n  },\n}\n"
  },
  {
    "path": "reduxToolkitTodo/.gitignore",
    "content": "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\npnpm-debug.log*\nlerna-debug.log*\n\nnode_modules\ndist\ndist-ssr\n*.local\n\n# Editor directories and files\n.vscode/*\n!.vscode/extensions.json\n.idea\n.DS_Store\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n*.sw?\n"
  },
  {
    "path": "reduxToolkitTodo/README.md",
    "content": "# React + Vite\n\nThis template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.\n\nCurrently, two official plugins are available:\n\n- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh\n- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh\n"
  },
  {
    "path": "reduxToolkitTodo/index.html",
    "content": "<!doctype html>\n<html lang=\"en\">\n  <head>\n    <meta charset=\"UTF-8\" />\n    <link rel=\"icon\" type=\"image/svg+xml\" href=\"/vite.svg\" />\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n    <title>Vite + React</title>\n  </head>\n  <body class=\"bg-gray-500\">\n    <div id=\"root\"></div>\n    <script type=\"module\" src=\"/src/main.jsx\"></script>\n  </body>\n</html>\n"
  },
  {
    "path": "reduxToolkitTodo/package.json",
    "content": "{\n  \"name\": \"reduxtoolkittodo\",\n  \"private\": true,\n  \"version\": \"0.0.0\",\n  \"type\": \"module\",\n  \"scripts\": {\n    \"dev\": \"vite\",\n    \"build\": \"vite build\",\n    \"lint\": \"eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0\",\n    \"preview\": \"vite preview\"\n  },\n  \"dependencies\": {\n    \"@reduxjs/toolkit\": \"^1.9.5\",\n    \"react\": \"^18.2.0\",\n    \"react-dom\": \"^18.2.0\",\n    \"react-redux\": \"^8.1.2\"\n  },\n  \"devDependencies\": {\n    \"@types/react\": \"^18.2.15\",\n    \"@types/react-dom\": \"^18.2.7\",\n    \"@vitejs/plugin-react\": \"^4.0.3\",\n    \"autoprefixer\": \"^10.4.15\",\n    \"eslint\": \"^8.45.0\",\n    \"eslint-plugin-react\": \"^7.32.2\",\n    \"eslint-plugin-react-hooks\": \"^4.6.0\",\n    \"eslint-plugin-react-refresh\": \"^0.4.3\",\n    \"postcss\": \"^8.4.29\",\n    \"tailwindcss\": \"^3.3.3\",\n    \"vite\": \"^4.4.5\"\n  }\n}\n"
  },
  {
    "path": "reduxToolkitTodo/postcss.config.js",
    "content": "export default {\n  plugins: {\n    tailwindcss: {},\n    autoprefixer: {},\n  },\n}\n"
  },
  {
    "path": "reduxToolkitTodo/src/App.css",
    "content": "#root {\n  max-width: 1280px;\n  margin: 0 auto;\n  padding: 2rem;\n  text-align: center;\n}\n\n.logo {\n  height: 6em;\n  padding: 1.5em;\n  will-change: filter;\n  transition: filter 300ms;\n}\n.logo:hover {\n  filter: drop-shadow(0 0 2em #646cffaa);\n}\n.logo.react:hover {\n  filter: drop-shadow(0 0 2em #61dafbaa);\n}\n\n@keyframes logo-spin {\n  from {\n    transform: rotate(0deg);\n  }\n  to {\n    transform: rotate(360deg);\n  }\n}\n\n@media (prefers-reduced-motion: no-preference) {\n  a:nth-of-type(2) .logo {\n    animation: logo-spin infinite 20s linear;\n  }\n}\n\n.card {\n  padding: 2em;\n}\n\n.read-the-docs {\n  color: #888;\n}\n"
  },
  {
    "path": "reduxToolkitTodo/src/App.jsx",
    "content": "import { useState } from 'react'\nimport reactLogo from './assets/react.svg'\nimport viteLogo from '/vite.svg'\nimport './App.css'\nimport AddTodo from './components/AddTodo'\nimport Todos from './components/Todos'\n\nfunction App() {\n  \n  return (\n    <>\n      <h1>Learn about redux toolkit</h1>\n      <AddTodo />\n      <Todos />\n    </>\n  )\n}\n\nexport default App\n"
  },
  {
    "path": "reduxToolkitTodo/src/app/store.js",
    "content": "import {configureStore} from '@reduxjs/toolkit';\nimport todoReducer from '../features/todo/todoSlice';\n\nexport const store = configureStore({\n    reducer: todoReducer\n})"
  },
  {
    "path": "reduxToolkitTodo/src/components/AddTodo.jsx",
    "content": "import React, {useState} from 'react'\nimport {useDispatch} from 'react-redux'\nimport {addTodo} from '../features/todo/todoSlice' \n\nfunction AddTodo() {\n\n    const [input, setInput] = useState('')\n    const dispatch = useDispatch()\n\n    const addTodoHandler = (e) => {\n        e.preventDefault()\n        dispatch(addTodo(input))\n        setInput('')\n    }\n\n  return (\n    <form onSubmit={addTodoHandler} className=\"space-x-3 mt-12\">\n      <input\n        type=\"text\"\n        className=\"bg-gray-800 rounded border border-gray-700 focus:border-indigo-500 focus:ring-2 focus:ring-indigo-900 text-base outline-none text-gray-100 py-1 px-3 leading-8 transition-colors duration-200 ease-in-out\"\n        placeholder=\"Enter a Todo...\"\n        value={input}\n        onChange={(e) => setInput(e.target.value)}\n      />\n      <button\n        type=\"submit\"\n        className=\"text-white bg-indigo-500 border-0 py-2 px-6 focus:outline-none hover:bg-indigo-600 rounded text-lg\"\n      >\n        Add Todo\n      </button>\n    </form>\n  )\n}\n\nexport default AddTodo"
  },
  {
    "path": "reduxToolkitTodo/src/components/Todos.jsx",
    "content": "import React from 'react'\nimport { useSelector, useDispatch } from 'react-redux'\nimport {removeTodo} from '../features/todo/todoSlice'\n\nfunction Todos() {\n    const todos = useSelector(state => state.todos)\n    const dispatch = useDispatch()\n\n  return (\n    <>\n    <div>Todos</div>\n    <ul className=\"list-none\">\n        {todos.map((todo) => (\n          <li\n            className=\"mt-4 flex justify-between items-center bg-zinc-800 px-4 py-2 rounded\"\n            key={todo.id}\n          >\n            <div className='text-white'>{todo.text}</div>\n            <button\n             onClick={() => dispatch(removeTodo(todo.id))}\n              className=\"text-white bg-red-500 border-0 py-1 px-4 focus:outline-none hover:bg-red-600 rounded text-md\"\n            >\n              <svg\n                xmlns=\"http://www.w3.org/2000/svg\"\n                fill=\"none\"\n                viewBox=\"0 0 24 24\"\n                strokeWidth={1.5}\n                stroke=\"currentColor\"\n                className=\"w-6 h-6\"\n              >\n                <path\n                  strokeLinecap=\"round\"\n                  strokeLinejoin=\"round\"\n                  d=\"M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0\"\n                />\n              </svg>\n            </button>\n          </li>\n        ))}\n      </ul>\n    </>\n  )\n}\n\nexport default Todos"
  },
  {
    "path": "reduxToolkitTodo/src/features/todo/todoSlice.js",
    "content": "import {createSlice, nanoid } from '@reduxjs/toolkit';\n\nconst initialState = {\n    todos: [{id: 1, text: \"Hello world\"}]\n}\n\n\n\nexport const todoSlice = createSlice({\n    name: 'todo',\n    initialState,\n    reducers: {\n        addTodo: (state, action) => {\n            const todo = {\n                id: nanoid(), \n                text: action.payload\n            }\n            state.todos.push(todo)\n        },\n        removeTodo: (state, action) => {\n            state.todos = state.todos.filter((todo) => todo.id !== action.payload )\n        },\n    }\n})\n\nexport const {addTodo, removeTodo} = todoSlice.actions\n\nexport default todoSlice.reducer"
  },
  {
    "path": "reduxToolkitTodo/src/index.css",
    "content": "@tailwind base;\n@tailwind components;\n@tailwind utilities;"
  },
  {
    "path": "reduxToolkitTodo/src/main.jsx",
    "content": "import React from 'react'\nimport ReactDOM from 'react-dom/client'\nimport App from './App.jsx'\nimport './index.css'\nimport { Provider } from 'react-redux'\nimport {store} from './app/store'\n\nReactDOM.createRoot(document.getElementById('root')).render(\n  <Provider store={store}>\n    <App />\n  </Provider>,\n)\n"
  },
  {
    "path": "reduxToolkitTodo/tailwind.config.js",
    "content": "/** @type {import('tailwindcss').Config} */\nexport default {\n  content: [\n    \"./index.html\",\n    \"./src/**/*.{js,ts,jsx,tsx}\",\n  ],\n  theme: {\n    extend: {},\n  },\n  plugins: [],\n}\n\n"
  },
  {
    "path": "reduxToolkitTodo/vite.config.js",
    "content": "import { defineConfig } from 'vite'\nimport react from '@vitejs/plugin-react'\n\n// https://vitejs.dev/config/\nexport default defineConfig({\n  plugins: [react()],\n})\n"
  },
  {
    "path": "todoContextapiNotes.md",
    "content": "# todo context api notes\n\n## Todo Form UI\n\n```javascript\nfunction TodoForm() {\n    \n\n    return (\n        <form  className=\"flex\">\n            <input\n                type=\"text\"\n                placeholder=\"Write Todo...\"\n                className=\"w-full border border-black/10 rounded-l-lg px-3 outline-none duration-150 bg-white/20 py-1.5\"\n            />\n            <button type=\"submit\" className=\"rounded-r-lg px-3 py-1 bg-green-600 text-white shrink-0\">\n                Add\n            </button>\n        </form>\n    );\n}\n\nexport default TodoForm;\n\n\n```\n\n## Todo Item UI\n\n```javascript\nfunction TodoItem({ todo }) {\n    \n\n    return (\n        <div\n            className={`flex border border-black/10 rounded-lg px-3 py-1.5 gap-x-3 shadow-sm shadow-white/50 duration-300  text-black ${\n                todo.completed ? \"bg-[#c6e9a7]\" : \"bg-[#ccbed7]\"\n            }`}\n        >\n            <input\n                type=\"checkbox\"\n                className=\"cursor-pointer\"\n                checked={todo.completed}\n                onChange={toggleCompleted}\n            />\n            <input\n                type=\"text\"\n                className={`border outline-none w-full bg-transparent rounded-lg ${\n                    isTodoEditable ? \"border-black/10 px-2\" : \"border-transparent\"\n                } ${todo.completed ? \"line-through\" : \"\"}`}\n                value={todoMsg}\n                onChange={(e) => setTodoMsg(e.target.value)}\n                readOnly={!isTodoEditable}\n            />\n            {/* Edit, Save Button */}\n            <button\n                className=\"inline-flex w-8 h-8 rounded-lg text-sm border border-black/10 justify-center items-center bg-gray-50 hover:bg-gray-100 shrink-0 disabled:opacity-50\"\n                onClick={() => {\n                    if (todo.completed) return;\n\n                    if (isTodoEditable) {\n                        editTodo();\n                    } else setIsTodoEditable((prev) => !prev);\n                }}\n                disabled={todo.completed}\n            >\n                {isTodoEditable ? \"📁\" : \"✏️\"}\n            </button>\n            {/* Delete Todo Button */}\n            <button\n                className=\"inline-flex w-8 h-8 rounded-lg text-sm border border-black/10 justify-center items-center bg-gray-50 hover:bg-gray-100 shrink-0\"\n                onClick={() => deleteTodo(todo.id)}\n            >\n                ❌\n            </button>\n        </div>\n    );\n}\n\nexport default TodoItem;\n\n```\n\n## App js UI\n\n```javascript\n<div className=\"bg-[#172842] min-h-screen py-8\">\n                <div className=\"w-full max-w-2xl mx-auto shadow-md rounded-lg px-4 py-3 text-white\">\n                    <h1 className=\"text-2xl font-bold text-center mb-8 mt-2\">Manage Your Todos</h1>\n                    <div className=\"mb-4\">\n                        {/* Todo form goes here */} \n                    </div>\n                    <div className=\"flex flex-wrap gap-y-3\">\n                        {/*Loop and Add TodoItem here */}\n                    </div>\n                </div>\n            </div>\n```\n\n\n"
  }
]