Commit f37d1583 by Madhankumar

new commit

parent b9638e6b
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/.pnp
.pnp.js
# testing
/coverage
# production
/build
# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
npm-debug.log*
yarn-debug.log*
yarn-error.log*
/** @type { import('@storybook/react-webpack5').StorybookConfig } */
const config = {
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
addons: [
"@storybook/addon-links",
"@storybook/addon-essentials",
"@storybook/preset-create-react-app",
"@storybook/addon-onboarding",
"@storybook/addon-interactions",
"@storybook/addon-actions",
],
framework: {
name: "@storybook/react-webpack5",
options: {},
},
docs: {
autodocs: "tag",
},
staticDirs: ["..\\public"],
};
export default config;
/** @type { import('@storybook/react').Preview } */
import "../src/index.css";
const preview = {
parameters: {
actions: { argTypesRegex: "^on[A-Z].*" },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
},
},
},
};
export default preview;
{
"recommendations": [
"esbenp.prettier-vscode"
]
}
\ No newline at end of file
# Getting Started with Create React App
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
## Available Scripts
In the project directory, you can run:
### `npm start`
Runs the app in the development mode.\
Open [http://localhost:3000](http://localhost:3000) to view it in your browser.
The page will reload when you make changes.\
You may also see any lint errors in the console.
### `npm test`
Launches the test runner in the interactive watch mode.\
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
### `npm run build`
Builds the app for production to the `build` folder.\
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.\
Your app is ready to be deployed!
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
### `npm run eject`
**Note: this is a one-way operation. Once you `eject`, you can't go back!**
If 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.
Instead, 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.
You 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.
## Learn More
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
To learn React, check out the [React documentation](https://reactjs.org/).
### Code Splitting
This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)
### Analyzing the Bundle Size
This 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)
### Making a Progressive Web App
This 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)
### Advanced Configuration
This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)
### Deployment
This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)
### `npm run build` fails to minify
This 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)
{
"task": [
{
"sId": 1,
"title": "rhrhrhrytyty",
"isCompleted": true,
"id": 1
},
{
"sId": 1,
"title": "helloxxsxsxsxsxsxsxsxsxsxsxsxsxssssssssssssssssssssxssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss",
"isCompleted": false,
"id": 2
},
{
"sId": 1,
"title": "hi",
"isCompleted": true,
"id": 3
}
]
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
{
"name": "todo-storybook",
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"json-server": "^0.17.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-icons": "^4.10.1",
"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",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build",
"server": "json-server --watch db.json --port 5000 --host 192.168.1.91"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest",
"plugin:storybook/recommended"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"@storybook/addon-actions": "^7.4.0",
"@storybook/addon-essentials": "^7.4.0",
"@storybook/addon-interactions": "^7.4.0",
"@storybook/addon-links": "^7.4.0",
"@storybook/addon-onboarding": "^1.0.8",
"@storybook/blocks": "^7.4.0",
"@storybook/preset-create-react-app": "^7.4.0",
"@storybook/react": "^7.4.0",
"@storybook/react-webpack5": "^7.4.0",
"@storybook/testing-library": "^0.2.0",
"babel-plugin-named-exports-order": "^0.0.2",
"eslint-plugin-storybook": "^0.6.13",
"prop-types": "^15.8.1",
"storybook": "^7.4.0",
"webpack": "^5.88.2"
}
}
<!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>
{
"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"
}
# https://www.robotstxt.org/robotstxt.html
User-agent: *
Disallow:
import { useEffect, useState } from "react";
import "./App.css";
import Layout from "./components/base/layout";
import Form from "./components/top-level/form";
import Tasks from "./components/top-level/tasks";
import {
addTodo,
getTodo,
updateRemainder,
updateTitle,
deleteTodo,
} from "./lib/api";
function App() {
const [task, setTask] = useState([]);
const addtask = async (data) => {
const todoData = await addTodo(data);
setTask([...task, todoData]);
};
const gettask = async () => {
const todoData = await getTodo();
setTask(todoData);
};
const updateremainder = async (id) => {
const todoData = await updateRemainder(id);
setTask(
task.map((e) =>
e.id === todoData.id ? { ...e, isCompleted: todoData.isCompleted } : e
)
);
};
const updatetitle = async (data) => {
const todoData = await updateTitle(data);
setTask(task.map((e) => (e.id === todoData.id ? todoData : e)));
};
const deletetask = async (id) => {
await deleteTodo(id);
setTask(task.filter((e) => e.id !== id));
};
// const getTask = async () => {
// const taskData = await fetch("http://192.168.1.91:5000/task");
// const response = await taskData.json();
// setTask(response);
// };
// const getTaskById = async (id) => {
// const tasktracker = await fetch(`http://192.168.1.91:5000/task/${id}`);
// const response = await tasktracker.json();
// return response;
// };
// const remainder = async (id) => {
// const toogle = await getTaskById(id);
// const result = { ...toogle, isCompleted: !toogle.isCompleted };
// const res = await fetch(`http://192.168.1.91:5000/task/${id}`, {
// method: "PUT",
// headers: { "Content-type": "application/json" },
// body: JSON.stringify(result),
// });
// const data = await res.json();
// setTask(
// task.map((e) =>
// e.id === data.id ? { ...e, isCompleted: data.isCompleted } : e
// )
// );
// };
// const editTask = async (datas) => {
// console.log(datas);
// const response = await fetch(`http://192.168.1.91:5000/task/${datas.id}`, {
// method: "PATCH",
// headers: { "Content-type": "application/json" },
// body: JSON.stringify({ title: datas.title }),
// });
// const data = await response.json();
// setTask(task.map((e) => (e.id === data.id ? data : e)));
// };
// const deleteTask = async (id) => {
// await fetch(`http://192.168.1.91:5000/task/${id}`, {
// method: "DELETE",
// });
// setTask(task.filter((e) => e.id !== id));
// };
useEffect(() => {
gettask();
}, []);
return (
<div className="App">
<Layout count={task.filter((e) => !e.isCompleted).length}>
{task.length > 0 ? (
<Tasks
tasklist={task}
onEdit={updatetitle}
remainder={updateremainder}
deleted={deletetask}
/>
) : (
<h3>No task</h3>
)}
<Form onSubmit={addtask} />
</Layout>
</div>
);
}
export default App;
import { render, screen } from '@testing-library/react';
import App from './App';
test('renders learn react link', () => {
render(<App />);
const linkElement = screen.getByText(/learn react/i);
expect(linkElement).toBeInTheDocument();
});
button {
font-size: 18px;
outline: none;
color: black;
border: 1px solid #ccc;
border-radius: 5px;
background-color: white;
padding: 14px 18px;
}
import Button from ".";
export default {
title: "Base/Button",
component: Button,
argTypes: { onClick: { action: "Clicked" } },
};
export const button = {
args: {
children: "Submit",
},
};
import "./button.css";
function Button({ children, ...props }) {
return <button {...props}>{children}</button>;
}
export default Button;
input[type="checkbox"]{
height:20px;
width:25px;
cursor: pointer;
}
.checkbox-bg{
background: white;
}
import Checkbox from ".";
export default {
title: "Base/Checkbox",
component: Checkbox,
argTypes: { onChange: { action: "checked" } },
};
export const checkbox = {
isCompleted: false,
};
// const Template = (args) => <Checkbox {...args} />;
// export const checkbox = Template.bind({});
// checkbox.args = {
// checked: false,
// };
import "./checkbox.css";
function Checkbox({ ...props }) {
return (
<div className="checkbox-bg">
<input type="checkbox" name="checkbox" {...props} />
</div>
);
}
export default Checkbox;
import "./input.css";
function Input({ ...props }) {
return (
<input type="text" required placeholder="Enter Item" {...props}></input>
);
}
export default Input;
input[type="text"]{
width:100%;
padding:1rem 1.5rem;
box-sizing: border-box;
border: 1px solid #ccc;
font-size:18px;
outline: none;
box-shadow: rgba(0, 0, 0, 0.12) 0px 2px 4px 0px inset;
border-radius: 5px;
}
\ No newline at end of file
import Input from ".";
export default {
title: "Base/Input",
component: Input,
};
export const input = {};
import "./layout.css";
function Layout({ count, ...props }) {
console.log(props);
return (
<div className="container">
<h2>
You have {count} {count > 1 ? "Todos" : "Todo"}
</h2>
{/* inner section that contain (tasklist and forms) */}
<div {...props}></div>
</div>
);
}
export default Layout;
.container {
min-height: 50vh;
width: min(100dvw - 5rem);
margin-inline: auto;
box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
background: white;
position: relative;
}
.container h2 {
box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
border: 1px solid #ccc;
text-align: center;
padding: 1.3rem 0px;
margin: 0;
font-weight: 800px;
background: white;
}
h3 {
margin-left: 1rem;
height: 200px;
text-align: center;
}
@media screen and (min-width: 1024px) {
.container {
width: 40dvw;
}
}
import Layout from ".";
export default {
title: "Base/Layout",
component: Layout,
};
export const layout = {
args: {
count: 0,
},
};
.form-section {
width: calc(100% - 2.5rem);
padding: 1rem;
background: white;
}
.form-section form {
display: flex;
align-items: center;
gap: 1rem;
}
import Form from ".";
export default {
title: "Top-Level/Form",
component: Form,
argTypes: { onSubmit: { action: "Submit" } },
};
export const form = {};
// const Template = (args) => <Form {...args} />;
// export const form = Template.bind({});
// form.args = {};
import { useState } from "react";
import Button from "../../base/button";
import Input from "../../base/input";
import "./form.css";
function Form({ onSubmit }) {
const [title, setTitle] = useState("");
let [count, setCount] = useState(0);
const handleSubmit = (e) => {
e.preventDefault();
let len = count + 1;
setCount(len);
const data = JSON.parse(
JSON.stringify({ sId: len, title, isCompleted: false })
);
onSubmit(data);
//setTitle("");
};
return (
<div className="form-section">
<form onSubmit={handleSubmit}>
<Input
required
value={title}
onChange={(e) => setTitle(e.target.value)}
/>
<Button>Submit</Button>
</form>
</div>
);
}
export default Form;
import { FaTimesCircle } from "react-icons/fa";
import Checkbox from "../../base/checkbox";
import "./task.css";
import { useEffect, useRef, useLayoutEffect, useState } from "react";
function Task({ id, title, isCompleted, onDelete, onChange, onEdit }) {
const [isedit, setIsEdit] = useState(false);
const [debouncetitle, setDebounceTitle] = useState(title);
const textarea_ref = useRef(null);
const handleDelete = (e) => {
e.preventDefault();
const dialog = window.confirm("Do you want to delete?");
if (dialog) {
onDelete({ id });
return true;
}
return false;
};
const handleChange = (e) => {
e.preventDefault();
isCompleted = !isCompleted;
onChange({ id, isCompleted: isCompleted ? "checked" : "unchecked" });
};
const handleContent = (e) => {
setIsEdit(true);
setDebounceTitle(e.target.value);
const textarea = document.querySelector("textarea");
textarea.addEventListener("keyup", (e) => {
let scheight = e.target.scrollHeight;
textarea.style.height = `${scheight}px`;
});
};
//debounce
useEffect(() => {
const handler = setTimeout(() => {
if (isedit) {
onEdit({ id, title: debouncetitle });
}
}, 3000);
return () => {
clearTimeout(handler);
};
}, [debouncetitle]);
useLayoutEffect(() => {
const scrollHeight = textarea_ref.current.scrollHeight;
textarea_ref.current.style.height = `${scrollHeight}px`;
}, [debouncetitle]);
return (
<div className="task-section">
<div>
<Checkbox
onChange={handleChange}
checked={isCompleted}
disabled={isCompleted}
/>
<textarea
ref={textarea_ref}
className={`${isCompleted ? "strike-through" : ""}`}
contentEditable={true}
value={debouncetitle}
onChange={handleContent}
disabled={isCompleted}
></textarea>
</div>
<FaTimesCircle className="fa-close" onClick={handleDelete} />
</div>
);
}
export default Task;
.task-section {
display: flex;
align-items: center;
padding: 0.5rem 0.8rem;
justify-content: space-between;
background: white;
box-shadow: rgba(0, 0, 0, 0.06) 0px 2px 4px 0px inset;
clip-path: inset(0 -100vmax);
}
.task-section > div {
display: flex;
align-items: center;
width: 50%;
}
.fa-close {
color: #ccc;
font-size: 25px;
}
input:focus {
border: 1px solid #ccc;
}
.strike-through {
text-decoration: line-through;
text-decoration-thickness: 1.5px;
}
.task-section textarea {
width: 100%;
resize: none;
border: none;
border-bottom: 1px solid #ccc;
outline: none;
margin: 0.3rem;
padding: 0;
}
.task-section textarea::-webkit-scrollbar {
width: 0;
}
import Task from ".";
export default {
title: "Top-Level/Task",
component: Task,
argTypes: {
onDelete: { action: "onDelete" },
onChange: { action: "onChange" },
onEdit: { action: "onEdit" },
},
};
export const task = {
args: {
id: 1,
title: "test task",
isCompleted: false,
},
};
import "./tasks.css";
import Task from "../task";
function Tasks({ tasklist, deleted, remainder, onEdit }) {
const handleChange = (id) => {
remainder(id);
};
return (
<div className="tasklist">
{tasklist.length > 0 &&
tasklist.map(({ id, title, isCompleted }) => (
<Task
key={id}
id={id}
title={title}
isCompleted={isCompleted}
onEdit={onEdit}
onChange={() => handleChange(id)}
onDelete={() => deleted(id)}
/>
))}
</div>
);
}
export default Tasks;
.tasks{
box-shadow: rgba(9, 30, 66, 0.25) 0px 1px 1px, rgba(9, 30, 66, 0.13) 0px 0px 1px 1px;
background: white;
padding: 1rem;
}
.tasks .task-section{
margin:0.20rem;
box-shadow: rgba(50, 50, 105, 0.15) 0px 2px 5px 0px, rgba(0, 0, 0, 0.05) 0px 1px 1px 0px;
}
.fa-close{
cursor: pointer;
}
.tasklist{
overflow:auto;
height: 240px;
}
\ No newline at end of file
@import url('https://fonts.googleapis.com/css2?family=PT+Sans:wght@600&family=Poppins:wght@600&display=swap');
body {
margin: 0;
font-family: "PT Sans", sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
background-image: -webkit-linear-gradient(
-90deg,
transparent 0%,
transparent 50%,
white 50%,
white 100%
),
-webkit-linear-gradient(0deg, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.1) 50%, white
50%, white 100%);
background-size: 0.2em 0.2em;
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
}
import React from "react";
import ReactDOM from "react-dom/client";
import "./index.css";
import App from "./App";
import reportWebVitals from "./reportWebVitals";
const root = ReactDOM.createRoot(document.getElementById("root"));
root.render(
// <React.StrictMode>
<App />
// </React.StrictMode>
);
// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();
const url = "http://192.168.1.91:5000/task";
//POST METHOD
export async function addTodo(data) {
try {
const response = await fetch(url, {
method: "POST",
headers: { "Content-type": "application/json" },
body: JSON.stringify(data),
});
const result = await response.json();
return result;
} catch (err) {
console.log(err.message);
}
}
//PATCH METHOD
export async function updateRemainder(id) {
try {
const response = await getTodoById(id);
const result = { ...response, isCompleted: !response.isCompleted };
const updateresponse = await fetch(url + `/${id}`, {
method: "PUT",
headers: { "Content-type": "application/json" },
body: JSON.stringify(result),
});
const resultData = await updateresponse.json();
return resultData;
} catch (err) {
console.log(err.message);
}
}
export async function updateTitle(data) {
try {
const response = await fetch(url + `/${data.id}`, {
method: "PATCH",
headers: { "Content-type": "application/json" },
body: JSON.stringify({ title: data.title }),
});
const result = await response.json();
return result;
} catch (err) {
console.log(err.message);
}
}
//GET METHOD
export async function getTodo() {
try {
const response = await fetch(url);
const result = await response.json();
return result;
} catch (err) {
console.log(err.message);
}
}
export async function getTodoById(id) {
try {
const response = await fetch(url + `/${id}`);
const result = await response.json();
return result;
} catch (err) {
console.log(err.message);
}
}
//DELETE METHOD
export async function deleteTodo(id) {
try {
return await fetch(url + `/${id}`, {
method: "DELETE",
});
} catch (err) {
console.log(err.message);
}
}
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 841.9 595.3"><g fill="#61DAFB"><path d="M666.3 296.5c0-32.5-40.7-63.3-103.1-82.4 14.4-63.6 8-114.2-20.2-130.4-6.5-3.8-14.1-5.6-22.4-5.6v22.3c4.6 0 8.3.9 11.4 2.6 13.6 7.8 19.5 37.5 14.9 75.7-1.1 9.4-2.9 19.3-5.1 29.4-19.6-4.8-41-8.5-63.5-10.9-13.5-18.5-27.5-35.3-41.6-50 32.6-30.3 63.2-46.9 84-46.9V78c-27.5 0-63.5 19.6-99.9 53.6-36.4-33.8-72.4-53.2-99.9-53.2v22.3c20.7 0 51.4 16.5 84 46.6-14 14.7-28 31.4-41.3 49.9-22.6 2.4-44 6.1-63.6 11-2.3-10-4-19.7-5.2-29-4.7-38.2 1.1-67.9 14.6-75.8 3-1.8 6.9-2.6 11.5-2.6V78.5c-8.4 0-16 1.8-22.6 5.6-28.1 16.2-34.4 66.7-19.9 130.1-62.2 19.2-102.7 49.9-102.7 82.3 0 32.5 40.7 63.3 103.1 82.4-14.4 63.6-8 114.2 20.2 130.4 6.5 3.8 14.1 5.6 22.5 5.6 27.5 0 63.5-19.6 99.9-53.6 36.4 33.8 72.4 53.2 99.9 53.2 8.4 0 16-1.8 22.6-5.6 28.1-16.2 34.4-66.7 19.9-130.1 62-19.1 102.5-49.9 102.5-82.3zm-130.2-66.7c-3.7 12.9-8.3 26.2-13.5 39.5-4.1-8-8.4-16-13.1-24-4.6-8-9.5-15.8-14.4-23.4 14.2 2.1 27.9 4.7 41 7.9zm-45.8 106.5c-7.8 13.5-15.8 26.3-24.1 38.2-14.9 1.3-30 2-45.2 2-15.1 0-30.2-.7-45-1.9-8.3-11.9-16.4-24.6-24.2-38-7.6-13.1-14.5-26.4-20.8-39.8 6.2-13.4 13.2-26.8 20.7-39.9 7.8-13.5 15.8-26.3 24.1-38.2 14.9-1.3 30-2 45.2-2 15.1 0 30.2.7 45 1.9 8.3 11.9 16.4 24.6 24.2 38 7.6 13.1 14.5 26.4 20.8 39.8-6.3 13.4-13.2 26.8-20.7 39.9zm32.3-13c5.4 13.4 10 26.8 13.8 39.8-13.1 3.2-26.9 5.9-41.2 8 4.9-7.7 9.8-15.6 14.4-23.7 4.6-8 8.9-16.1 13-24.1zM421.2 430c-9.3-9.6-18.6-20.3-27.8-32 9 .4 18.2.7 27.5.7 9.4 0 18.7-.2 27.8-.7-9 11.7-18.3 22.4-27.5 32zm-74.4-58.9c-14.2-2.1-27.9-4.7-41-7.9 3.7-12.9 8.3-26.2 13.5-39.5 4.1 8 8.4 16 13.1 24 4.7 8 9.5 15.8 14.4 23.4zM420.7 163c9.3 9.6 18.6 20.3 27.8 32-9-.4-18.2-.7-27.5-.7-9.4 0-18.7.2-27.8.7 9-11.7 18.3-22.4 27.5-32zm-74 58.9c-4.9 7.7-9.8 15.6-14.4 23.7-4.6 8-8.9 16-13 24-5.4-13.4-10-26.8-13.8-39.8 13.1-3.1 26.9-5.8 41.2-7.9zm-90.5 125.2c-35.4-15.1-58.3-34.9-58.3-50.6 0-15.7 22.9-35.6 58.3-50.6 8.6-3.7 18-7 27.7-10.1 5.7 19.6 13.2 40 22.5 60.9-9.2 20.8-16.6 41.1-22.2 60.6-9.9-3.1-19.3-6.5-28-10.2zM310 490c-13.6-7.8-19.5-37.5-14.9-75.7 1.1-9.4 2.9-19.3 5.1-29.4 19.6 4.8 41 8.5 63.5 10.9 13.5 18.5 27.5 35.3 41.6 50-32.6 30.3-63.2 46.9-84 46.9-4.5-.1-8.3-1-11.3-2.7zm237.2-76.2c4.7 38.2-1.1 67.9-14.6 75.8-3 1.8-6.9 2.6-11.5 2.6-20.7 0-51.4-16.5-84-46.6 14-14.7 28-31.4 41.3-49.9 22.6-2.4 44-6.1 63.6-11 2.3 10.1 4.1 19.8 5.2 29.1zm38.5-66.7c-8.6 3.7-18 7-27.7 10.1-5.7-19.6-13.2-40-22.5-60.9 9.2-20.8 16.6-41.1 22.2-60.6 9.9 3.1 19.3 6.5 28.1 10.2 35.4 15.1 58.3 34.9 58.3 50.6-.1 15.7-23 35.6-58.4 50.6zM320.8 78.4z"/><circle cx="420.9" cy="296.5" r="45.7"/><path d="M520.5 78.1z"/></g></svg>
\ No newline at end of file
const reportWebVitals = onPerfEntry => {
if (onPerfEntry && onPerfEntry instanceof Function) {
import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
getCLS(onPerfEntry);
getFID(onPerfEntry);
getFCP(onPerfEntry);
getLCP(onPerfEntry);
getTTFB(onPerfEntry);
});
}
};
export default reportWebVitals;
// jest-dom adds custom jest matchers for asserting on DOM nodes.
// allows you to do things like:
// expect(element).toHaveTextContent(/react/i)
// learn more: https://github.com/testing-library/jest-dom
import '@testing-library/jest-dom';
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment