Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
5923b74
New play added named Keeper and install material ui dependencies for …
Shivam-Katare Apr 20, 2022
e161e82
deleted thr footer.jsx
Shivam-Katare Apr 21, 2022
7920e03
Renamed thumbnail.png to cover.png
Shivam-Katare Apr 21, 2022
a26fd53
Removed all extra spaces
Shivam-Katare Apr 21, 2022
0cefca1
Removed all the material ui styling, icons and added react-icons
Shivam-Katare Apr 21, 2022
25cf681
Removed material ui dependencies from package.json file
Shivam-Katare Apr 21, 2022
df84f70
Removed material ui dependencies
Shivam-Katare Apr 21, 2022
beeb515
Upgraded to React v18
Shivam-Katare Apr 22, 2022
0a09b18
Merge branch 'main' into main
Shivam-Katare Apr 23, 2022
21f818e
Readme file added for keeper play
Shivam-Katare Apr 23, 2022
0e8f561
Updated yarn.lock file
Shivam-Katare Apr 23, 2022
34198d5
Readme file added for keeper play
Shivam-Katare Apr 23, 2022
b5ed4f9
yarn.lock file updated
Shivam-Katare Apr 23, 2022
8d6d655
delete another createroot
Shivam-Katare Apr 23, 2022
df08e18
setFilterquery dependency added to useEffect, to remove warnings
Shivam-Katare Apr 23, 2022
d4d5cc2
package-lock.json
Shivam-Katare Apr 23, 2022
8e79fa2
all updated
Shivam-Katare Apr 23, 2022
ff4e33f
Remove customHooks and kept only rendering logic
Shivam-Katare Apr 26, 2022
7bf26f0
create new file named useLocalStorage and add all custom Hooks to com…
Shivam-Katare Apr 26, 2022
6f62131
Created hooks folder for custom hooks
Shivam-Katare Apr 29, 2022
0851975
Hooks folder added in keeper play
Shivam-Katare Apr 29, 2022
cb3f360
Files updated
Shivam-Katare Apr 29, 2022
f95ee5a
updated
Shivam-Katare Apr 29, 2022
b0f9861
custom Font-Family styling removed
Shivam-Katare May 3, 2022
036652e
updated
Shivam-Katare May 3, 2022
64e0721
Reamoved extra spaces
Shivam-Katare May 3, 2022
b07ddeb
Delete yarn.lock
Shivam-Katare May 3, 2022
8decc07
Merge branch 'main' into main
Shivam-Katare May 3, 2022
ba9538d
removed duplicate plays
Shivam-Katare May 4, 2022
5515dec
Removed overridden selectors
Shivam-Katare May 4, 2022
7116251
Unused library Removed
Shivam-Katare May 4, 2022
eb8614b
Responsiveness added
Shivam-Katare May 4, 2022
f8c2806
Cover.png deleted
Shivam-Katare May 4, 2022
7c14383
cover image updated
Shivam-Katare May 4, 2022
b9416fb
Delete package-lock.json
Shivam-Katare May 5, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
"version": "1.0.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^5.14.1",
"@testing-library/react": "^12.0.0",
"@testing-library/user-event": "^13.2.1",
"plop": "^3.0.5",
"react": "^18.0.0",
"react-dom": "^18.0.0",
Expand Down
2 changes: 1 addition & 1 deletion src/common/home/Home.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const Home = () => {
tags: [],
creator: "",
});
}, [data, setSearchTerm, searchTerm]);
}, [data, setSearchTerm, searchTerm, setFilterQuery]);

return (
<div>
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import RouteDefs from "common/routing/RouteDefs";
import { SearchContext } from "common/search/search-context";
import "index.css";
import React, { useState } from "react";
import { createRoot } from "react-dom/client";
import { createRoot } from 'react-dom/client';
import reportWebVitals from "reportWebVitals";

const Index = () => {
Expand Down
128 changes: 61 additions & 67 deletions src/meta/play-meta.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
States,
SocialCard,
RandomMemeGenerator,
Keeper,
ReactTodoApp,
ExpandingCards,
AnalogClock,
Expand Down Expand Up @@ -81,69 +82,64 @@ export const plays = [
tags: "Recursion, Tree",
github: "green-roots",
featured: true,
},
{
id: "pl-counter",
name: "Counter",
description:
"A simple counter which increments the value upto a certain limit!",
component: () => {
return <CounterApp />;
},
path: "/plays/counter",
level: "Beginner",
tags: "JSX, State, Props",
github: "murtuzaalisurti"
},
{
id: "pl-states",
name: "States",
description: "States in Functional Components",
component: () => {
return <States />;
},
path: "/plays/states",
level: "Beginner",
tags: "Hooks,State,JSX",
github: "Abhishek-90",
cover: "",
blog: "https://abhishek-90.github.io/My-Portfolio/",
},
{
id: "pl-social-card",
name: "Social Card",
description:
"The Social Card helps you telling who you are using photo, name, and other social footprints.",
component: () => {
return <SocialCard />;
},
path: "/plays/social-card",
level: "Intermediate",
tags: "Form,Events,Complex State",
github: "atapas",
featured: true,
cover: "",
blog: "https://blog.greenroots.info/how-to-create-react-form-with-a-single-change-event-handler",
video: "",
},
{
id: "pl-random-meme-generator",
name: "Random Meme Generator",
description:
"A project to demonstrate the use of API to fetch random memes! It also demonstrates how you can do event handling!",
component: () => {
return <RandomMemeGenerator />;
},
path: "/plays/random-meme-generator",
level: "Beginner",
tags: "JSX,Hooks,API,EventHandling",
github: "murtuzaalisurti",
featured: true,
cover: "",
blog: "",
video: "",
},
{
}, {
id: 'pl-counter',
name: 'Counter',
description: 'A simple counter which increments the value upto a certain limit!',
component: () => {return <CounterApp />},
path: '/plays/counter',
level: 'Beginner',
tags: 'JSX, State, Props',
github: 'murtuzaalisurti',
featured: true
}, {
id: 'pl-states',
name: 'States',
description: 'States in Functional Components',
component: () => {return <States />},
path: '/plays/states',
level: 'Beginner',
tags: 'Hooks,State,JSX',
github: 'Abhishek-90',
cover: '',
blog: 'https://abhishek-90.github.io/My-Portfolio/'
}, {
id: 'pl-social-card',
name: 'Social Card',
description: 'The Social Card helps you telling who you are using photo, name, and other social footprints.',
component: () => {return <SocialCard />},
path: '/plays/social-card',
level: 'Intermediate',
tags: 'Form,Events,Complex State',
github: 'atapas',
cover: '',
blog: 'https://blog.greenroots.info/how-to-create-react-form-with-a-single-change-event-handler',
video: ''
}, {
id: 'pl-random-meme-generator',
name: 'Random Meme Generator',
description: 'A project to demonstrate the use of API to fetch random memes! It also demonstrates how you can do event handling!',
component: () => {return <RandomMemeGenerator />},
path: '/plays/random-meme-generator',
level: 'Beginner',
tags: 'JSX,Hooks,API,EventHandling',
github: 'murtuzaalisurti',
cover: '',
blog: '',
video: ''
}, {
id: 'pl-keeper',
name: 'Keeper',
description: 'Keeper is the clone of google keep where we can save and delete our notes',
component: () => {return <Keeper />},
path: '/plays/keeper',
level: 'Intermediate',
tags: 'JSX,Hooks,ReactDOM',
github: 'Shivam-Katare',
cover: 'https://res.cloudinary.com/dbjmy6wdu/image/upload/v1651678725/keepicon_jsn5bh.png',
blog: '',
video: ''
}, {
id: "pl-react-todo-app",
name: "React Todo App",
description:
Expand All @@ -159,8 +155,7 @@ export const plays = [
"https://res.cloudinary.com/atapas/image/upload/v1650866465/demos/cover_y20bzk.png",
blog: "",
video: "",
},
{
}, {
id: "pl-expanding-cards",
name: "Expanding-Cards",
description:
Expand All @@ -176,8 +171,7 @@ export const plays = [
cover: "",
blog: "",
video: "",
},
{
}, {
id: "pl-analog-clock",
name: "Analog-Clock",
description: "A beautiful wall clock",
Expand Down
2 changes: 2 additions & 0 deletions src/plays/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ export { default as CounterApp } from 'plays/counter/CounterApp';
export { default as States } from 'plays/states/States';
export { default as SocialCard } from 'plays/social-card/SocialCard';
export { default as RandomMemeGenerator } from 'plays/random-meme-generator/RandomMemeGenerator';
export { default as Keeper } from 'plays/keeper/Keeper';
export { default as ReactTodoApp } from 'plays/react-todo-app/ReactTodoApp';
export { default as ExpandingCards } from 'plays/expanding-cards/ExpandingCards';
export { default as AnalogClock } from 'plays/analog-clock/AnalogClock';

//add export here
51 changes: 51 additions & 0 deletions src/plays/keeper/CreateArea.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import React, { useState } from "react";
import { FaPlusCircle } from 'react-icons/fa';

function CreateArea(props) {
const [note, setNote] = useState({
title: "",
content: ""
});
function handleChange(event) {
const { name, value } = event.target;
setNote(prevNote => {
return {
...prevNote,
[name]: value
};
});
}
function submitNote(event) {
props.onAdd(note);
setNote({
title: "",
content: ""
});
event.preventDefault();
}
return (
<div>
<form className="create-note">
{(
<input
className="create-input"
name="title"
onChange={handleChange}
value={note.title}
placeholder="Title"
/>
)
}
<textarea
className="create-text"
name="content"
onChange={handleChange}
value={note.content}
placeholder="Take a note..."
/>
<button className="create-button" onClick={submitNote}>< FaPlusCircle /></button>
</form>
</div>
);
}
export default CreateArea;
10 changes: 10 additions & 0 deletions src/plays/keeper/Header.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import React from "react";
import { FaMedapps } from 'react-icons/fa';
function Header() {
return <>
<header className="head">
<h1 className="headsHeading"> <FaMedapps /> KEEPER </h1>
</header>
</>
}
export default Header;
35 changes: 35 additions & 0 deletions src/plays/keeper/Hooks/useLocalStorage.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import { useState } from "react";

function useLocalStorage(key, initialValue) {
// State to store our value
// Pass initial state function to useState so logic is only executed once
const [storedValue, setStoredValue] = useState(() => {
try {
// Get from local storage by key
const item = localStorage.getItem(key);
// Parse stored json or if none return initialValue
return item ? JSON.parse(item) : initialValue;
} catch (error) {
// If error also return initialValue
return initialValue;
}
});
// Return a wrapped version of useState's setter function that ...
// ... persists the new value to localStorage.
const setValue = (value) => {
try {
// Allow value to be a function so we have same API as useState
const valueToStore =
value instanceof Function ? value(storedValue) : value;
// Save state
setStoredValue(valueToStore);
// Save to local storage
window.localStorage.setItem(key, JSON.stringify(valueToStore));
} catch (error) {
// A more advanced implementation would handle the error case
console.log(error);
}
};
return [storedValue, setValue];
}
export default useLocalStorage;
Loading