renamed
This commit is contained in:
commit
0a7a469d56
315 files changed
+426907
No files matched your search
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"files": {
|
||||
"main.css": "/static/css/main.305410ed.css",
|
||||
"main.js": "/static/js/main.dde63dc0.js",
|
||||
"index.html": "/index.html",
|
||||
"main.305410ed.css.map": "/static/css/main.305410ed.css.map",
|
||||
"main.dde63dc0.js.map": "/static/js/main.dde63dc0.js.map"
|
||||
},
|
||||
"entrypoints": [
|
||||
"static/css/main.305410ed.css",
|
||||
"static/js/main.dde63dc0.js"
|
||||
]
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.8 KiB |
@@ -0,0 +1 @@
|
||||
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>React App</title><script defer="defer" src="/static/js/main.dde63dc0.js"></script><link href="/static/css/main.305410ed.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 5.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 9.4 KiB |
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"short_name": "React App",
|
||||
"name": "Create React App Sample",
|
||||
"icons": [
|
||||
{
|
||||
"src": "favicon.ico",
|
||||
"sizes": "64x64 32x32 24x24 16x16",
|
||||
"type": "image/x-icon"
|
||||
},
|
||||
{
|
||||
"src": "logo192.png",
|
||||
"type": "image/png",
|
||||
"sizes": "192x192"
|
||||
},
|
||||
{
|
||||
"src": "logo512.png",
|
||||
"type": "image/png",
|
||||
"sizes": "512x512"
|
||||
}
|
||||
],
|
||||
"start_url": ".",
|
||||
"display": "standalone",
|
||||
"theme_color": "#000000",
|
||||
"background_color": "#ffffff"
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
# https://www.robotstxt.org/robotstxt.html
|
||||
User-agent: *
|
||||
Disallow:
|
||||
@@ -0,0 +1,2 @@
|
||||
.error{color:red}.error,.normal{background:#d3d3d3;border-radius:5px;border-style:solid;font-size:20px;margin-bottom:10px;padding:10px}.normal{color:green}
|
||||
/*# sourceMappingURL=main.305410ed.css.map*/
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"static/css/main.305410ed.css","mappings":"AAAA,OACE,SAOF,CACA,eAPE,kBAAqB,CAGrB,iBAAkB,CADlB,kBAAmB,CADnB,cAAe,CAIf,kBAAmB,CADnB,YAWF,CARA,QACE,WAOF","sources":["index.css"],"sourcesContent":[".error {\n color: red;\n background: lightgrey;\n font-size: 20px;\n border-style: solid;\n border-radius: 5px;\n padding: 10px;\n margin-bottom: 10px;\n}\n.normal {\n color: green;\n background: lightgrey;\n font-size: 20px;\n border-style: solid;\n border-radius: 5px;\n padding: 10px;\n margin-bottom: 10px;\n}\n"],"names":[],"sourceRoot":""}
|
||||
@@ -0,0 +1,3 @@
|
||||
/*! For license information please see main.dde63dc0.js.LICENSE.txt */
|
||||
!function(){"use strict";var e={463:function(e,n,t){var r=t(791),a=t(296);function l(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,t=1;t<arguments.length;t++)n+="&args[]="+encodeURIComponent(arguments[t]);return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var o=new Set,i={};function u(e,n){s(e,n),s(e+"Capture",n)}function s(e,n){for(i[e]=n,e=0;e<n.length;e++)o.add(n[e])}var c=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),f=Object.prototype.hasOwnProperty,d=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p={},h={};function m(e,n,t,r,a,l,o){this.acceptsBooleans=2===n||3===n||4===n,this.attributeName=r,this.attributeNamespace=a,this.mustUseProperty=t,this.propertyName=e,this.type=n,this.sanitizeURL=l,this.removeEmptyString=o}var v={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){v[e]=new m(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var n=e[0];v[n]=new m(n,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){v[e]=new m(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){v[e]=new m(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){v[e]=new m(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){v[e]=new m(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){v[e]=new m(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){v[e]=new m(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){v[e]=new m(e,5,!1,e.toLowerCase(),null,!1,!1)}));var y=/[\-:]([a-z])/g;function g(e){return e[1].toUpperCase()}function b(e,n,t,r){var a=v.hasOwnProperty(n)?v[n]:null;(null!==a?0!==a.type:r||!(2<n.length)||"o"!==n[0]&&"O"!==n[0]||"n"!==n[1]&&"N"!==n[1])&&(function(e,n,t,r){if(null===n||"undefined"===typeof n||function(e,n,t,r){if(null!==t&&0===t.type)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==t?!t.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,n,t,r))return!0;if(r)return!1;if(null!==t)switch(t.type){case 3:return!n;case 4:return!1===n;case 5:return isNaN(n);case 6:return isNaN(n)||1>n}return!1}(n,t,a,r)&&(t=null),r||null===a?function(e){return!!f.call(h,e)||!f.call(p,e)&&(d.test(e)?h[e]=!0:(p[e]=!0,!1))}(n)&&(null===t?e.removeAttribute(n):e.setAttribute(n,""+t)):a.mustUseProperty?e[a.propertyName]=null===t?3!==a.type&&"":t:(n=a.attributeName,r=a.attributeNamespace,null===t?e.removeAttribute(n):(t=3===(a=a.type)||4===a&&!0===t?"":""+t,r?e.setAttributeNS(r,n,t):e.setAttribute(n,t))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var n=e.replace(y,g);v[n]=new m(n,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var n=e.replace(y,g);v[n]=new m(n,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach(Line truncated
|
||||
//# sourceMappingURL=main.dde63dc0.js.map
|
||||
@@ -0,0 +1,39 @@
|
||||
/**
|
||||
* @license React
|
||||
* react-dom.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @license React
|
||||
* react-jsx-runtime.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @license React
|
||||
* react.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @license React
|
||||
* scheduler.production.min.js
|
||||
*
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"static/js/main.dde63dc0.js","mappings":";oDAYa,IAAIA,EAAGC,EAAQ,KAASC,EAAGD,EAAQ,KAAa,SAASE,EAAEC,GAAG,IAAI,IAAIC,EAAE,yDAAyDD,EAAEE,EAAE,EAAEA,EAAEC,UAAUC,OAAOF,IAAID,GAAG,WAAWI,mBAAmBF,UAAUD,IAAI,MAAM,yBAAyBF,EAAE,WAAWC,EAAE,gHAAgH,CAAC,IAAIK,EAAG,IAAIC,IAAIC,EAAG,CAAC,EAAE,SAASC,EAAGT,EAAEC,GAAGS,EA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AAI,mBAAmBD,OAAOC,IAAI,uBAAuBD,OAAOC,IAAI,eAAeD,OAAOC,IAAI,wBAAwB,IAAIa,EAAGd,OAAOe,SAAS,SAASC,EAAG5E,GAAG,OAAG,OAAOA,GAAG,kBAAkBA,EAAS,KAAwC,oBAAnCA,EAAE0E,GAAI1E,EAAE0E,IAAK1E,EAAE,eAA0CA,EAAE,IAAI,CAAC,IAAoB6E,EAAhBC,EAAE7D,OAAO8D,OAAU,SAASC,EAAGhF,GAAG,QAAG,IAAS6E,EAAG,IAAI,MAAMI,OAAQ,CAAC,MAAM/E,GAAG,IAAID,EAAEC,EAAEgF,MAAMC,OAAOC,MAAM,gBAAgBP,EAAG5E,GAAGA,EAAE,IAAI,EAAE,CAAC,MAAM,KAAK4E,EAAG7E,CAAC,CAAC,IAAIqF,GAAG,EACzb,SAASC,EAAGtF,EAAEC,GAAG,IAAID,GAAGqF,EAAG,MAAM,GAAGA,GAAG,EAAG,IAAInF,EAAE+E,MAAMM,kBAAkBN,MAAMM,uBAAkB,EAAO,IAALine truncated
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"persons": [
|
||||
{
|
||||
"name": "dsdsd",
|
||||
"number": "sdsdsds",
|
||||
"id": 6
|
||||
},
|
||||
{
|
||||
"name": "dfadf",
|
||||
"number": "dafasdfa",
|
||||
"id": 7
|
||||
},
|
||||
{
|
||||
"name": "sdfadfadaf",
|
||||
"number": "adfadfadsf",
|
||||
"id": 9
|
||||
}
|
||||
]
|
||||
}
|
||||
Generated
+34150
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"name": "p1",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@testing-library/jest-dom": "^5.16.5",
|
||||
"@testing-library/react": "^13.4.0",
|
||||
"@testing-library/user-event": "^13.5.0",
|
||||
"axios": "^1.4.0",
|
||||
"react": "^18.2.0",
|
||||
"react-dom": "^18.2.0",
|
||||
"react-scripts": "5.0.1",
|
||||
"web-vitals": "^2.1.4"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "react-scripts start",
|
||||
"build": "react-scripts build",
|
||||
"test": "react-scripts test",
|
||||
"eject": "react-scripts eject",
|
||||
"server": "npx json-server --port 3001 --watch db.json"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": [
|
||||
"react-app",
|
||||
"react-app/jest"
|
||||
]
|
||||
},
|
||||
"browserslist": {
|
||||
"production": [
|
||||
">0.2%",
|
||||
"not dead",
|
||||
"not op_mini all"
|
||||
],
|
||||
"development": [
|
||||
"last 1 chrome version",
|
||||
"last 1 firefox version",
|
||||
"last 1 safari version"
|
||||
]
|
||||
},
|
||||
"devDependencies": {
|
||||
"json-serve": "^0.1.0"
|
||||
},
|
||||
"proxy": "http://localhost:3001"
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.8 KiB |
@@ -0,0 +1,43 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta name="theme-color" content="#000000" />
|
||||
<meta
|
||||
name="description"
|
||||
content="Web site created using create-react-app"
|
||||
/>
|
||||
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
|
||||
<!--
|
||||
manifest.json provides metadata used when your web app is installed on a
|
||||
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
|
||||
-->
|
||||
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
|
||||
<!--
|
||||
Notice the use of %PUBLIC_URL% in the tags above.
|
||||
It will be replaced with the URL of the `public` folder during the build.
|
||||
Only files inside the `public` folder can be referenced from the HTML.
|
||||
|
||||
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
|
||||
work correctly both with client-side routing and a non-root public URL.
|
||||
Learn how to configure a non-root public URL by running `npm run build`.
|
||||
-->
|
||||
<title>React App</title>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||
<div id="root"></div>
|
||||
<!--
|
||||
This HTML file is a template.
|
||||
If you open it directly in the browser, you will see an empty page.
|
||||
|
||||
You can add webfonts, meta tags, or analytics to this file.
|
||||
The build step will place the bundled scripts into the <body> tag.
|
||||
|
||||
To begin the development, run `npm start` or `yarn start`.
|
||||
To create a production bundle, use `npm run build` or `yarn build`.
|
||||
-->
|
||||
</body>
|
||||
</html>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 5.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 9.4 KiB |
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"short_name": "React App",
|
||||
"name": "Create React App Sample",
|
||||
"icons": [
|
||||
{
|
||||
"src": "favicon.ico",
|
||||
"sizes": "64x64 32x32 24x24 16x16",
|
||||
"type": "image/x-icon"
|
||||
},
|
||||
{
|
||||
"src": "logo192.png",
|
||||
"type": "image/png",
|
||||
"sizes": "192x192"
|
||||
},
|
||||
{
|
||||
"src": "logo512.png",
|
||||
"type": "image/png",
|
||||
"sizes": "512x512"
|
||||
}
|
||||
],
|
||||
"start_url": ".",
|
||||
"display": "standalone",
|
||||
"theme_color": "#000000",
|
||||
"background_color": "#ffffff"
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
# https://www.robotstxt.org/robotstxt.html
|
||||
User-agent: *
|
||||
Disallow:
|
||||
@@ -0,0 +1,44 @@
|
||||
import Persons from "./components/Persons";
|
||||
import Filter from "./components/Filter";
|
||||
import PersonForm from "./components/PersonForm";
|
||||
import Notification from "./components/Notification";
|
||||
import { useState, useEffect } from "react";
|
||||
import personServices from "./services/persons";
|
||||
|
||||
const App = () => {
|
||||
const [persons, setPersons] = useState([]);
|
||||
const [filter, setFilter] = useState("");
|
||||
const [message, setMessage] = useState(null);
|
||||
useEffect(() => {
|
||||
personServices.getAll().then((response) => setPersons(response.data));
|
||||
}, []);
|
||||
|
||||
function displayMessage(message, type = "normal") {
|
||||
setMessage({message,type});
|
||||
setTimeout(() => {
|
||||
setMessage(null);
|
||||
}, 5000);
|
||||
}
|
||||
return (
|
||||
<div>
|
||||
<h2>Phonebook</h2>
|
||||
<Notification message={message} />
|
||||
<Filter persons={persons} filter={filter} setFilter={setFilter} />
|
||||
<h2>add a new</h2>
|
||||
<PersonForm
|
||||
persons={persons}
|
||||
setPersons={setPersons}
|
||||
displayMessage={displayMessage}
|
||||
/>
|
||||
<h2>Numbers</h2>
|
||||
<Persons
|
||||
persons={persons.filter((el) =>
|
||||
el.name.toLowerCase().includes(filter.toLowerCase())
|
||||
)}
|
||||
setPersons={setPersons}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default App;
|
||||
@@ -0,0 +1,19 @@
|
||||
function Course({ course }) {
|
||||
const total = course.parts.reduce((acc, curr) => acc + curr.exercises, 0);
|
||||
return (
|
||||
<>
|
||||
<h1>{course.name}</h1>
|
||||
<ul>
|
||||
{course.parts.map((c) => (
|
||||
<li key={c.id}>
|
||||
{c.name} {c.exercises}
|
||||
</li>
|
||||
))}
|
||||
<li>
|
||||
<b>total of</b> {total} <b>exercises</b>
|
||||
</li>
|
||||
</ul>
|
||||
</>
|
||||
);
|
||||
}
|
||||
export default Course;
|
||||
@@ -0,0 +1,12 @@
|
||||
function Filter({ filter, setFilter}) {
|
||||
function onFilter(e) {
|
||||
setFilter(e.target.value);
|
||||
}
|
||||
|
||||
return (
|
||||
<div>
|
||||
filter shown with <input value={filter} onChange={onFilter} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
export default Filter;
|
||||
@@ -0,0 +1,5 @@
|
||||
const Notification= ({message}) => {
|
||||
if (message === null) return null;
|
||||
return <div className={message.type}>{message.message}</div>;
|
||||
};
|
||||
export default Notification
|
||||
@@ -0,0 +1,60 @@
|
||||
import { useState } from "react";
|
||||
import personServices from "../services/persons";
|
||||
|
||||
function PersonForm({ persons, setPersons, displayMessage }) {
|
||||
const [newName, setNewName] = useState("");
|
||||
const [newNumber, setNewNumber] = useState("");
|
||||
|
||||
function onAddPerson(e) {
|
||||
e.preventDefault();
|
||||
const newPerson = { name: newName, number: newNumber };
|
||||
const id = persons.find((el) => el.name === newName)?.id;
|
||||
if (id) {
|
||||
personServices
|
||||
.update(id, newPerson)
|
||||
.then(() => {
|
||||
setPersons(
|
||||
persons.map((person) => (person.id !== id ? person : newPerson))
|
||||
);
|
||||
displayMessage("Number changed");
|
||||
})
|
||||
.catch((err) => {
|
||||
console.error(err.message);
|
||||
displayMessage("Number has already been removed", "error");
|
||||
});
|
||||
} else {
|
||||
personServices
|
||||
.create(newPerson)
|
||||
.then(() => {
|
||||
setPersons([...persons, newPerson]);
|
||||
displayMessage("Person Added");
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log(error.response.data)
|
||||
displayMessage('Validation Error', "error");
|
||||
});
|
||||
}
|
||||
setNewName("");
|
||||
setNewNumber("");
|
||||
}
|
||||
|
||||
return (
|
||||
<form onSubmit={onAddPerson}>
|
||||
<div>
|
||||
name:{" "}
|
||||
<input value={newName} onChange={(e) => setNewName(e.target.value)} />
|
||||
</div>
|
||||
<div>
|
||||
number:{" "}
|
||||
<input
|
||||
value={newNumber}
|
||||
onChange={(e) => setNewNumber(e.target.value)}
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<button type="submit">add</button>
|
||||
</div>
|
||||
</form>
|
||||
);
|
||||
}
|
||||
export default PersonForm;
|
||||
@@ -0,0 +1,20 @@
|
||||
import personServices from "../services/persons";
|
||||
|
||||
function Persons({ persons, setPersons }) {
|
||||
function onDelete(id) {
|
||||
personServices
|
||||
.remove(id)
|
||||
.then(setPersons(persons.filter((pred) => pred.id != id)));
|
||||
}
|
||||
return (
|
||||
<ul>
|
||||
{persons.map((person, index) => (
|
||||
<li key={index}>
|
||||
{person.name} {person.number}{" "}
|
||||
<button onClick={() => onDelete(person.id)}>delete</button>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
);
|
||||
}
|
||||
export default Persons;
|
||||
@@ -0,0 +1,18 @@
|
||||
.error {
|
||||
color: red;
|
||||
background: lightgrey;
|
||||
font-size: 20px;
|
||||
border-style: solid;
|
||||
border-radius: 5px;
|
||||
padding: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.normal {
|
||||
color: green;
|
||||
background: lightgrey;
|
||||
font-size: 20px;
|
||||
border-style: solid;
|
||||
border-radius: 5px;
|
||||
padding: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
import React from 'react'
|
||||
import ReactDOM from 'react-dom/client'
|
||||
import './index.css'
|
||||
|
||||
import App from './App'
|
||||
|
||||
const notes = [
|
||||
{
|
||||
id: 1,
|
||||
content: 'HTML is easy',
|
||||
important: true
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
content: 'Browser can execute only JavaScript',
|
||||
important: false
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
content: 'GET and POST are the most important methods of HTTP protocol',
|
||||
important: true
|
||||
}
|
||||
]
|
||||
|
||||
ReactDOM.createRoot(document.getElementById('root')).render(
|
||||
<App notes={notes} />
|
||||
)
|
||||
@@ -0,0 +1,15 @@
|
||||
import axios from "axios";
|
||||
const baseUrl = "/api/persons/";
|
||||
|
||||
|
||||
const getAll = () => axios.get(baseUrl);
|
||||
const create = (newPerson) => axios.post(baseUrl, newPerson);
|
||||
const remove = (id) => axios.delete(baseUrl.concat(id.toString()));
|
||||
const update = (id, newPerson) => axios.put(`${baseUrl}${id}`, newPerson);
|
||||
|
||||
export default {
|
||||
getAll: getAll,
|
||||
create: create,
|
||||
remove: remove,
|
||||
update: update,
|
||||
};
|
||||
@@ -0,0 +1,78 @@
|
||||
import { useState } from "react";
|
||||
function Statistics({ good, bad, neutral }) {
|
||||
return (
|
||||
<div>
|
||||
<h1>statistics</h1>
|
||||
<ul>
|
||||
<StatisticsLine text={"good"} value={good} />
|
||||
<StatisticsLine text={"neutral"} value={neutral} />
|
||||
<StatisticsLine text={"bad"} value={bad} />
|
||||
<StatisticsLine text={"all"} value={bad + good + neutral} />
|
||||
<StatisticsLine
|
||||
text={"average"}
|
||||
value={(good - bad) / (good + bad + neutral)}
|
||||
/>
|
||||
</ul>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
function StatisticsLine({ text, value }) {
|
||||
return (
|
||||
<li>
|
||||
{text}: {value}
|
||||
</li>
|
||||
);
|
||||
}
|
||||
|
||||
function Anecdotes({ anecdotes, selected }) {
|
||||
return (
|
||||
<>
|
||||
<div>{anecdotes[selected]}</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
const App = () => {
|
||||
// save clicks of each button to its own state
|
||||
const [good, setGood] = useState(0);
|
||||
const [neutral, setNeutral] = useState(0);
|
||||
const [bad, setBad] = useState(0);
|
||||
const [selected, setSelected] = useState(0);
|
||||
const [votes, setVotes] = useState(new Array(7).fill(0));
|
||||
const anecdotes = [
|
||||
"If it hurts, do it more often.",
|
||||
"Adding manpower to a late software project makes it later!",
|
||||
"The first 90 percent of the code accounts for the first 10 percent of the development time...The remaining 10 percent of the code accounts for the other 90 percent of the development time.",
|
||||
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand.",
|
||||
"Premature optimization is the root of all evil.",
|
||||
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.",
|
||||
"Programming without an extremely heavy use of console.log is same as if a doctor would refuse to use x-rays or blood tests when diagnosing patients.",
|
||||
"The only way to go fast, is to go well.",
|
||||
];
|
||||
|
||||
let highest = Math.max(...votes)
|
||||
function addVote() {
|
||||
let newVotes = [...votes];
|
||||
newVotes[selected] += 1;
|
||||
setVotes(newVotes);
|
||||
}
|
||||
return (
|
||||
<div>
|
||||
<h1>give feedback</h1>
|
||||
<button onClick={() => setGood(good + 1)}>good</button>
|
||||
<button onClick={() => setNeutral(neutral + 1)}>neutral</button>
|
||||
<button onClick={() => setBad(bad + 1)}>bad</button>
|
||||
<Statistics good={good} bad={bad} neutral={neutral} />
|
||||
<Anecdotes anecdotes={anecdotes} selected={selected} />
|
||||
<h1>has {votes[selected]} votes</h1>
|
||||
<button onClick={() => addVote()}>vote</button>
|
||||
<button onClick={() => setSelected(Math.floor(Math.random() * 7))}>
|
||||
next anecdote{" "}
|
||||
</button>
|
||||
<h1>Is the most liked</h1>
|
||||
<Anecdotes anecdotes={anecdotes} selected={Math.max(...votes)}/>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default App;
|
||||
@@ -0,0 +1,6 @@
|
||||
import React from 'react'
|
||||
import ReactDOM from 'react-dom/client'
|
||||
|
||||
import App from './App'
|
||||
|
||||
ReactDOM.createRoot(document.getElementById('root')).render(<App />)
|
||||
Reference in new issue
Block a user