CGPLFE updated

parent 6475249e
# 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
.env.local
.env.development.local
.env.test.local
.env.production.local
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# 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:
### `yarn start`
Runs the app in the development mode.\
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
The page will reload if you make edits.\
You will also see any lint errors in the console.
### `yarn 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.
### `yarn 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.
### `yarn 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)
### `yarn 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)
File added
This diff is collapsed.
{
"name": "cgp1fe",
"version": "0.1.0",
"private": true,
"dependencies": {
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.1.0",
"@testing-library/user-event": "^12.1.10",
"bootstrap": "^5.0.2",
"chart.js": "^3.6.0",
"powerbi-client-react": "^1.3.3",
"react": "^17.0.2",
"react-bootstrap": "^2.0.0-beta.4",
"react-chartjs-2": "^3.3.0",
"react-dom": "^17.0.2",
"react-fetch-progressbar": "^1.0.0",
"react-highlight-words": "^0.17.0",
"react-loader-spinner": "^4.0.0",
"react-promise-tracker": "^2.1.0",
"react-router-dom": "^5.2.0",
"react-scripts": "4.0.3",
"react-show-more-text": "^1.5.0",
"reactjs-popup": "^2.0.5",
"web-vitals": "^1.0.1"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"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"
]
}
}
<!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" />
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC"
crossorigin="anonymous"
/>
<!--
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:
.App {
text-align: center;
}
.App-logo {
height: 40vmin;
pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
.App-logo {
animation: App-logo-spin infinite 20s linear;
}
}
.App-header {
background-color: #282c34;
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: calc(10px + 2vmin);
color: white;
}
.App-link {
color: #61dafb;
}
@keyframes App-logo-spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
ul.list {
font-size: medium;
list-style-type: none;
}
.itemStyles {
margin: 0px 10px 0px 10px;
}
.cusLink:hover {
cursor: pointer;
}
.custom-container {
background-color: cornsilk;
}
.list-row {
border-bottom: 1;
border-bottom-color: black;
}
.title-text {
color: blueviolet;
font-size: large;
font-weight: 600;
}
.sub-title-text {
color: rgb(23, 9, 36);
font-weight: 700;
}
.sub-title-text-2 {
color: rgb(23, 9, 36);
font-weight: 500;
font-size: 1;
}
.latest-container {
border: 1;
border-color: #282c34;
color: #61dafb;
}
.search-box {
width: 400;
}
#header-search {
color: #333333;
justify-content: center;
width: "100%";
flex: 1;
}
.vacancy-container {
flex: 1;
align-content: stretch;
}
/*pagination styles*/
.pagination {
display: flex;
align-items: center;
justify-content: center;
}
.paginationItem {
background: #fff;
border: 2px solid #666;
padding: 10px 15px;
border-radius: 50%;
height: 45px;
width: 45px;
position: relative;
margin: 0 5px;
cursor: pointer;
}
.paginationItem span {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.prev,
.next {
background: #fff;
border: none;
padding: 10px;
color: blue;
box-shadow: 0 0 3px rgba(0, 0, 0, 0.4);
margin: 0 10px;
cursor: pointer;
}
.paginationItem.active {
border: 1px solid #888;
color: #888;
pointer-events: none;
}
.prev.disabled,
.next.disabled {
pointer-events: none;
box-shadow: none;
color: #999;
}
/* Popup style */
.popup-box {
position: fixed;
background: #00000050;
width: 100%;
height: 100vh;
top: 0;
left: 0;
}
.popup {
position: fixed;
width: 100%;
height: 100%;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: auto;
background-color: rgba(0, 0, 0, 0.5);
}
.popup_open {
position: absolute;
left: 15%;
right: 15%;
top: 15%;
bottom: 15%;
padding: 10;
margin: auto;
border-radius: 20px;
background: white;
}
.box {
position: relative;
width: 70%;
margin: 0 auto;
height: auto;
max-height: 70vh;
margin-top: calc(100vh - 85vh - 20px);
background: #fff;
border-radius: 4px;
padding: 20px;
border: 1px solid #999;
overflow: auto;
}
.close-icon {
content: "x";
cursor: pointer;
position: fixed;
right: calc(15% - 30px);
top: calc(100vh - 85vh - 33px);
background: #ededed;
width: 25px;
height: 25px;
border-radius: 50%;
line-height: 20px;
text-align: center;
border: 1px solid #999;
font-size: 20px;
}
/* highlight color */
.mark,
mark {
padding: 0.08em;
font-size: 110%;
font-weight: 650;
}
/* item gazette */
.description-text {
font-size: 0.8rem;
line-height: 0.1em;
margin-bottom: 10 !important;
}
.item-title {
color: darkblue;
font-weight: 600;
}
.colStyle1 {
margin-left: 10px;
padding: 10px;
font-weight: 600;
color: darkmagenta;
font-size: large;
}
.colStyle2 {
padding: 10px;
font-weight: 600;
color: teal;
font-size: large;
}
import "./App.css";
import React, { useState } from "react";
import Home from "./components/Home";
import Login from "./components/Login";
import { progressBarFetch, setOriginalFetch } from "react-fetch-progressbar";
import Gazettes from "./components/AllGazettes";
// ^ ^ these should be removed when using func compo
// import Vacancy from "./components/Vacancy";
import Vacancy from "./components/Vacancynew";
import Navigation from "./components/Navigation";
import CommodityView from "./components/CommodityView";
// import CommodityView from "./components/BackupCom";
import { BrowserRouter, NavLink, Route, Switch } from "react-router-dom";
import GazetteDetailView from "./components/GazetteDetailView";
import Exam from "./components/Exam";
function App(props) {
const [user, setuser] = useState({ empid: "", password: "", dep: "" });
const [error, setError] = useState("");
const login = (details) => {
console.log("this is the output:" + details);
if (details.empid != "") {
console.log("logged in " + details.empid);
setuser({
empid: details.empid,
dep: details.dep,
});
}
};
const Logout = () => {
console.log("Logout");
setuser("");
// window.location.reload();
window.location.href = "/";
};
return (
<BrowserRouter>
{user.empid != "" ? (
<div className="container">
<ul className="list m-3 d-flex justify-content-end">
<li className="itemStyles">
| &nbsp; Welcome {user.empid} &nbsp; |
</li>
<li className="itemStyles">Department : {user.dep} &nbsp; |</li>
{/* <NavLink to="/"> */}
<li className="itemStyles cusLink" onClick={Logout}>
Logout&nbsp; |
</li>
{/* </NavLink> */}
</ul>
<h2 className="m-3 d-flex justify-content-center">eGaz</h2>
<Navigation />
<Switch>
<Route
path="/"
exact
render={(props) => <Home {...props} />}
></Route>
<Route
path="/gazette"
exact
render={(props) => <Gazettes {...props} dep={user.dep} />}
></Route>
<Route path="/gazetteDetails" component={GazetteDetailView}></Route>
<Route path="/vacancy" component={Vacancy}></Route>
<Route path="/exam" component={Exam}></Route>
<Route path="/commodity" component={CommodityView}></Route>
</Switch>
</div>
) : (
<Route
path="/"
exact
render={(props) => <Login {...props} login={login} />}
></Route>
)}
</BrowserRouter>
);
}
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();
});
import React, { useState, useEffect } from "react";
import Container from "react-bootstrap/Container";
import Row from "react-bootstrap/Row";
import Col from "react-bootstrap/Col";
import InputGroup from "react-bootstrap/InputGroup";
import Button from "react-bootstrap/Button";
import FormControl from "react-bootstrap/FormControl";
import Search from "./search";
import MenuDropDown from "./MenuDropDown";
import ItemGazette from "./ItemGazette";
import Pagination from "./Pagination";
import { Popup } from "./Popup";
export default function GazettesFunc(props) {
const [gazettes, setgazettes] = useState([]);
const [error, setError] = useState("");
const [QValue, setQValue] = useState("");
const [filteredData, setFilteredData] = useState(gazettes);
let textInput = React.createRef();
const [showPopup, setshowPopup] = useState(false);
const [dep, setdep] = useState("unknown dep");
const department = props.dep;
const [suggestions, setsuggestions] = useState([]);
const [Hint, setHint] = useState("");
useEffect(() => {
fetch(process.env.REACT_APP_API + "getalldata")
.then((response) => {
if (response.ok) return response.json();
throw new Error("something went wrong while requesting posts");
})
/*------------------------------------------------------------------------------------------*/
.then((posts) => {
console.log("right here" + posts[2].department);
let r = [];
r = posts.filter((data) => {
if (department == "Guest") {
return data;
} else if (data.department == department) {
return data;
}
});
console.log(department);
setgazettes(r);
setFilteredData(r);
})
/*---------------------------------------------------------------------------------------------*/
.catch((error) => setError(error.message));
}, []);
const togglePopup = () => {
setshowPopup((showPopup) => !showPopup);
};
const handleSearch = () => {
let value = textInput.current.value.toLowerCase();
setQValue(value);
fetch(process.env.REACT_APP_API + "spellingChecker/" + value)
.then((response) => {
if (response.ok) return response.json();
throw new Error("something went wrong while requesting posts");
})
.then((posts) => {
console.log("suggestions " + posts.list);
if (posts.list.length > 0) {
setHint("Did you mean : ");
}
setsuggestions(posts.list);
});
let result = [];
result = gazettes.filter((data) => {
if (data.key != "value") {
if (data.description.toLowerCase().includes(value)) {
console.log(data);
if (data.department == department) {
return data;
}
}
// return data[5].department.includes(value) != -1;
}
});
setFilteredData(result);
};
if (error) return <h1>{error}</h1>;
return (
<div>
<Row>
<Col className="p-2" xs={12} md={8}></Col>
<Col className="p-2 mr-2">
<InputGroup className="mb-3">
<FormControl placeholder="Start typing..." ref={textInput} />
<Button
variant="outline-secondary"
id="button-addon2"
onClick={() => handleSearch()}
>
Search Now
</Button>
</InputGroup>
</Col>
</Row>
<Container>
<div>
{filteredData.length > 0 ? (
<>
<Pagination
data={filteredData}
RenderComponent={ItemGazette}
title="Search All Gazette Details"
pageLimit={
filteredData.length <= 10
? 1
: Math.round(filteredData.length / 10) + 1
}
dataLimit={10}
query={QValue}
/>
</>
) : (
<>
<p>
{Hint}
{suggestions.map((item) => (
<span
style={{
color: "chocolate",
marginLeft: 20,
fontWeight: "bold",
fontSize: 20,
}}
>
{item}
</span>
))}
</p>
{Hint == "" ? (
<h1>Waiting for data...</h1>
) : (
<h3>Check your search query...</h3>
)}
</>
)}
</div>
</Container>
</div>
);
}
// export class Gazettes extends Component {
// constructor(props) {
// super(props);
// this.state = { gazettes: [] };
// }
// refreshLIst() {
// fetch(process.env.REACT_APP_API + "postvacancy") //later change this to
// .then((response) => response.json())
// .then((data) => {
// // this.setState({ gazettes: data });
// });
// }
// componentDidMount() {
// // this.refreshLIst();
// }
// componentDidUpdate() {
// // this.refreshLIst();
// }
// render() {
// const { gazettes } = this.state;
// const sampleSummary = [
// {
// id: "1",
// cat: "General",
// topic1: "Appointments by the President",
// topic2: "Sri Lanka Nacy Regular Force",
// topic3:
// "Retirement and Transfer to the Regular Naval Reserve approved by his Excellency the President",
// name: "HiS excellencythe President has approved the retirement of undermentioned senior officer from the Regular Naval force of Sri Lanka Navy with effect from 01st September 2021 and transfer to the Regular Naval Reserve on the same date.",
// },
// {
// id: "2",
// cat: "General",
// topic1: "Appointments by the President",
// topic2: "Sri Lanka Nacy Regular Force",
// topic3:
// "Retirement and Transfer to the Regular Naval Reserve approved by his Excellency the President",
// name: "Summarized data, Summarized data, Summarized data, Summarized data, Summarized data, Summarized data, Summarized data, Summarized data, Summarized data, Summarized data, Summarized data, Summarized data, Summarized data, Summarized data, Summarized data, Summarized data, ",
// },
// {
// id: "3",
// cat: "General",
// topic1: "Appointments by the President",
// topic2: "Sri Lanka Nacy Regular Force",
// topic3:
// "Retirement and Transfer to the Regular Naval Reserve approved by his Excellency the President",
// name: "We have yet another React post!",
// },
// {
// id: "4",
// cat: "General",
// topic1: "Appointments by the President",
// topic2: "Sri Lanka Nacy Regular Force",
// topic3: "Promotion approved by his Excellency the President",
// name: "This is the fourth and final post",
// },
// ];
// return (
// <div>
// <Row>
// <Col className="p-2" xs={12} md={8}>
// <MenuDropDown />
// </Col>
// <Col className="p-2 mr-2">
// <Search />
// </Col>
// </Row>
// <Container>
// {sampleSummary.map((ss) => (
// <>
// <Row>
// <Col className=" pt-2 title-text">{ss.cat}</Col>
// </Row>
// <Row className="pt-1 px-2 sub-title-text">{ss.topic3}</Row>
// <Row className="p-2">{ss.name}</Row>
// </>
// ))}
// </Container>
// </div>
// );
// }
// }
/**
* import React, { Component } from "react";
import { useState, useEffect } from "react";
import Container from "react-bootstrap/Container";
import Row from "react-bootstrap/Row";
import Col from "react-bootstrap/Col";
import Search from "./search";
export default function Gazettes() {
const [data, setData] = useState([]);
const getData = () => {
fetch("http://127.0.0.1:8000/gazettemst/", {
headers: {
"Content-Type": "application/json",
Accept: "application/json",
},
})
.then(function (response) {
console.log(response);
return response.json();
})
.then(function (myJson) {
console.log(myJson);
setData(myJson);
});
};
useEffect(() => {
getData();
}, []);
return (
<div className="App">
{data && data.length > 0 && data.map((item) => <p>{item.GTitle}</p>)}
</div>
);
}
*/
import React, { useState, useEffect } from "react";
import Container from "react-bootstrap/Container";
import Row from "react-bootstrap/Row";
import Col from "react-bootstrap/Col";
import { Button } from "react-bootstrap";
import { useLocation } from "react-router-dom";
import Up from "../img/up.png";
import Down from "../img/down.png";
export default function CommodityView() {
const [com, setcom] = useState([]);
useEffect(() => {
fetch(process.env.REACT_APP_API + "commodity")
.then((response) => response.json())
.then((data) => {
setcom(data);
console.log(data);
});
// .catch((error) => setError(error.message));
}, []);
let location = useLocation();
console.log(location.state.gno);
return (
<div className="custom-container p-2">
<Container className="p-2">
<Row>
<Col>
<h3 className="p-2">Latest Price Changes as per 22.09.2021</h3>
</Col>
<Col md="auto"></Col>
<Col xs lg="2">
<Button>Refresh</Button>
</Col>
</Row>
{com.map((item) => (
<Row>
<Col className="colStyle1" xs={15} md={3}>
{item.NAME}
</Col>
<Col className="colStyle2" xs={2} md={3}>
Old Price: {item.CURRENTPRICE}
</Col>
<Col className="colStyle2" xs={2} md={2}>
New Price: {item.NEWPRICE}
</Col>
<Col>
{item.NEWPRICE.match(/(\d+)/) >
item.CURRENTPRICE.match(/(\d+)/) ? (
<img
src={Up}
style={{ width: 20, height: 20, marginTop: 10 }}
/>
) : (
<img
src={Down}
style={{ width: 20, height: 20, marginTop: 10 }}
/>
)}
</Col>
</Row>
))}
</Container>
</div>
);
}
import React, { useState, useEffect } from "react";
import Container from "react-bootstrap/Container";
import Row from "react-bootstrap/Row";
import Col from "react-bootstrap/Col";
import { Button } from "react-bootstrap";
import { useLocation } from "react-router-dom";
import PowerBi from "./PowerBi";
import Up from "../img/up.png";
import Down from "../img/down.png";
import { PowerBIEmbed } from "powerbi-client-react";
import { Line } from "react-chartjs-2";
import data from "./data";
export default function CommodityView() {
const [com, setcom] = useState([]);
const gggg = [];
const [Items, setItems] = useState([]);
useEffect(() => {
fetch(process.env.REACT_APP_API + "comcompare")
.then((response) => response.json())
.then((data) => {
setItems(data);
});
fetch(process.env.REACT_APP_API + "commodity")
.then((response) => response.json())
.then((data) => {
setcom(data);
console.log(data);
});
// .catch((error) => setError(error.message));
}, []);
const data1 = data;
const options = {
scales: {
y: {
beginAtZero: true,
},
},
};
let location = useLocation();
console.log(location.state.gno);
return (
<div className="custom-container p-2">
<Container className="p-2">
<Row>
<Col>
<h3>Latest Price Changes as per 22.11.2021</h3>
</Col>
<Col md="auto"></Col>
<Col xs lg="2"></Col>
</Row>
<Row>
{com.map((item) => (
<Row style={{marginBottom: 10}}>
<Col className="colStyle1" xs={15} md={3}>
{item.NAME}
</Col>
<Col className="colStyle2" xs={2} md={3}>
Old Price: {item.CURRENTPRICE}
</Col>
<Col className="colStyle2" xs={2} md={3}>
New Price: {item.NEWPRICE}
</Col>
<Col>
{item.NEWPRICE.match(/(\d+)/) >
item.CURRENTPRICE.match(/(\d+)/) ? (
<img
src={Up}
style={{ width: 20, height: 20, marginTop: 10 }}
/>
) :
(
<img
src={Down}
style={{ width: 20, height: 20, marginTop: 10 }}
/>
)}
</Col>
</Row>
))}
</Row>
<Row style={{marginTop:30, marginBottom: 30}}>
<Col md={12}><center><h3>Analysis of the last 6 months</h3></center></Col>
</Row>
<Row >
<Col md={12}>
<Line data={data1} options={options} />
</Col>
</Row>
</Container>
</div>
);
}
import React, { useEffect, useState } from "react";
import Container from "react-bootstrap/Container";
import Row from "react-bootstrap/Row";
import Col from "react-bootstrap/Col";
import Form from "react-bootstrap/Form";
import "reactjs-popup/dist/index.css";
import Popup from "./Popup";
import Loader from "react-loader-spinner";
import { usePromiseTracker } from "react-promise-tracker";
import { trackPromise } from "react-promise-tracker";
const LoadingIndicator = (props) => {
const { promiseInProgress } = usePromiseTracker();
return (
promiseInProgress && (
<>
<div
style={{
width: "100%",
height: "100%",
display: "flex",
justifyContent: "center",
alignItems: "center",
padding: 20,
}}
>
<Loader type="ThreeDots" color="#666666" height="50" width="50" />
&nbsp;Reading Data... Please Wait &nbsp;
<Loader type="ThreeDots" color="#666666" height="50" width="50" />
</div>
</>
)
);
};
export default function Exam() {
const [vac, setVac] = useState([]);
const [filteredData, setFilteredData] = useState(vac);
const [selectedClient, setSelectedClient] = useState("");
const [showPopup, setshowPopup] = useState(false);
function handleSelectChange(event) {
setSelectedClient(event.target.value);
fetchVacancy();
fetchVacancy();
}
function fetchVacancy() {
trackPromise(
fetch(process.env.REACT_APP_API + "examination/" + selectedClient)
.then(console.log("done"))
.then((response) => response.json())
.then((data) => {
setVac(data);
setFilteredData(data);
})
);
}
useEffect(() => {
fetchVacancy();
return () => {};
}, []);
function executeOnClick(isExpanded) {
console.log(isExpanded);
}
const togglePopup = () => {
setshowPopup((showPopup) => !showPopup);
};
return (
<>
<div>
<Form>
<Container className="p-2 vacancy-container">
<Row md={4}>
<Col md={2} className="">
<div key={1} className="mb-3">
<Form.Label style={{ padding: 5 }}>
Select Examinations
</Form.Label>
</div>
</Col>
<Col xs={4}>
<Form.Select
aria-label="Default select example"
value={selectedClient}
onChange={handleSelectChange}
>
<option value="Select">-Select-</option>
<option value="Academic" onClick={handleSelectChange}>
Academic
</option>
<option value="Administrative" onClick={handleSelectChange}>
Administrative
</option>
<option value="Engineering" onClick={handleSelectChange}>
Engineering
</option>
<option value="Healthcare" onClick={handleSelectChange}>
Healthcare
</option>
<option value="Operations" onClick={handleSelectChange}>
Operations
</option>
<option value="Other" onClick={handleSelectChange}>
Other
</option>
</Form.Select>
</Col>
</Row>
</Container>
</Form>
<Container>
<LoadingIndicator />
{filteredData.map((ss) => (
<>
{/* {text = ss.summary.substr(0,10)} */}
<Row>
<Col className=" pt-2 title-text">
<span>{ss.title}</span>
{/**show full description */}
</Col>
</Row>
<Row className="pt-1 px-2 sub-title-text-2">
{ss.summary}
<br />
<button onClick={togglePopup.bind()}>
Read Full Description
</button>
{showPopup ? (
<Popup
text={ss.description}
closePopup={togglePopup.bind()}
/>
) : (
<span style={{ fontWeight: 600 }}>
<a
style={{ textDecoration: "none" }}
href={ss.url}
target="_blank"
>
Go to original Gazette PDF
</a>
</span>
)}
<br />
</Row>
{/* <Row className="p-2">{ss.summary}</Row> */}
</>
))}
</Container>
</div>
</>
);
}
import React from "react";
import Container from "react-bootstrap/Container";
import Row from "react-bootstrap/Row";
import Col from "react-bootstrap/Col";
import { Button } from "react-bootstrap";
export default function GazetteDetailView() {
return (
<div className="custom-container p-2">
<Container className="p-2">
<Row>
<Col>
<h3 className="p-2">Details</h3>
</Col>
<Col md="auto"></Col>
<Col xs lg="2">
<Button>Download</Button>
</Col>
</Row>
</Container>
<div className="d-flex justify-content-center"> 06.08.2021</div>
</div>
);
}
import React, { Component } from "react";
import Container from "react-bootstrap/Container";
import Row from "react-bootstrap/Row";
import Col from "react-bootstrap/Col";
import { Button } from "react-bootstrap";
import { NavLink } from "react-router-dom";
export default class Home extends Component {
constructor(props) {
super(props);
this.state = { gazettes: [], responseStatus: "null" };
this.counter = 0;
}
downloader() {
fetch(process.env.REACT_APP_API + "gazetteDownloadDetailsApi")
.then((response) => response.json())
.then((data) => {
this.setState({ gazettes: data });
});
}
refresher() {
fetch(process.env.REACT_APP_API + "gazette")
.then((response) => response.json())
.then((data) => {
console.log(data.files_exist);
this.setState({ responseStatus: "yes" });
if (data.files_exist == "yes") {
this.setState({ responseStatus: data.files_exist });
console.log("inside");
}
});
}
componentDidMount() {
while (this.counter < 1) {
this.downloader();
// this.refresher();
this.counter = this.counter + 1;
}
}
componentDidUpdate() {
while (this.counter < 1) {
this.downloader();
// this.refresher();
this.counter = this.counter + 1;
}
}
render() {
const { gazettes, responseStatus } = this.state;
return (
<div className="custom-container p-2">
<Container className="p-2">
<Row>
<Col>
<h3 className="p-2">Latest Gazettes</h3>
</Col>
<Col md="auto"></Col>
<Col xs lg="2">
<Button
onClick={() => {
this.refresher();
if (this.state.responseStatus == "yes") {
alert("Latest Files have already been downloaded!");
}
}}
>
Download
</Button>
</Col>
</Row>
</Container>
<Container className="p-3 border border-info">
{gazettes.map((gazette) => (
<Row className="list-row" key={gazette.GazetteNo}>
<Row>
<Col xs={12} md={8} className="title-text">
<span style={{ color: "#0000ff", fontWeight: 700 }}>
Gazette Number: {gazette.GazetteNo}{" "}
</span>
(Advertising I-II A)
</Col>
</Row>
<Row className="pt-2 pl-2 mb-3">
<Col xs={12} md={12}>
Published Date: {gazette.GazetteDate}
</Col>
</Row>
<Row className="mb-3">
<Col xs={12} md={12}>
{gazette.PriceAvl == "0" ? (
<span></span>
) : (
<span style={{ color: "#ee0000" }}>
Price Changes are Available! Click{" "}
<NavLink
to={{
pathname: "/commodity",
state: { gno: gazette.GazetteNo },
}}
>
here
</NavLink>
</span>
)}
</Col>
</Row>
</Row>
))}
</Container>
</div>
);
}
}
import React from "react";
import Highlighter from "react-highlight-words";
function ItemGazette(props) {
const { title, description, summary } = props.data;
const q = props.query.split(" ");
console.log("check he");
console.log(q);
return (
<div>
<div className="card-view" style={{ marginBottom: 20 }}>
<p className="item-title">{title}</p>
{q[0] != "" ? (
<>
<Highlighter
className="description-text"
highlightClassName="YourHighlightClass"
searchWords={q}
autoEscape={true}
textToHighlight={summary}
/>
{/* {console.log(q)} */}
</>
) : (
<small>{summary}</small>
)}
</div>
</div>
);
}
export default ItemGazette;
import React, { useState } from "react";
import Form from "react-bootstrap/Form";
import Button from "react-bootstrap/Button";
import Container from "react-bootstrap/Container";
import Row from "react-bootstrap/Row";
import Col from "react-bootstrap/Col";
export default function Login({ login, error }) {
const [user, setuser] = useState({ empid: "", password: "", dep: "" });
const submitHandler = (e) => {
e.preventDefault();
fetch(process.env.REACT_APP_API + "userhandler/" + user.empid)
.then((response) => response.json())
.then((data) => {
if (data.UserEmpID === user.empid) {
user.dep = data.UserDepartment;
login(user);
}
});
// login(user);
};
const clickHandler = () => {
// e.preventDefault();
setuser({ empid: "Guest", password: "", dep: "Guest" });
login(user);
};
return (
<div className="login-form m-3 justify-content-center">
<Container className="text-center">
<Row>
<Col md={{ span: 6, offset: 3 }}>
<h3 className="login-head">Login</h3>
</Col>
</Row>
<Row className="p-2"></Row>
<Row>
<Col md={{ span: 6, offset: 3 }}>
<Form onSubmit={submitHandler}>
<Form.Group className="mb-3" controlId="formEmpId">
<Form.Label>EMP ID</Form.Label>
<Form.Control
type="text"
placeholder="Enter Employee ID"
onChange={(e) => setuser({ ...user, empid: e.target.value })}
value={user.empid}
/>
</Form.Group>
<Form.Group className="mb-3" controlId="formBasicPassword">
<Form.Label>Password</Form.Label>
<Form.Control
type="password"
placeholder="Password"
onChange={(e) =>
setuser({ ...user, password: e.target.value })
}
value={user.password}
/>
</Form.Group>
<Button
style={{
paddingTop: 20,
paddingBottom: 20,
paddingLeft: 35,
paddingRight: 35,
}}
variant="primary"
type="submit"
>
Login
</Button>
</Form>
</Col>
</Row>
<Row style={{ padding: 20 }}>
<Col xs={6} md={4}></Col>
<Col xs={6} md={4}>
<Button variant="secondary" type="submit" onClick={clickHandler}>
Guest Login
</Button>
</Col>
<Col xs={6} md={4}></Col>
</Row>
</Container>
</div>
);
}
import React from "react";
import Dropdown from "react-bootstrap/Dropdown";
export default function MenuDropDown() {
return (
<div>
<Dropdown className="d-inline mx-2">
<Dropdown.Toggle id="dropdown-autoclose-true">Date</Dropdown.Toggle>
<Dropdown.Menu>
<Dropdown.Item href="#">30-07-2021</Dropdown.Item>
<Dropdown.Item href="#">16-07-2021</Dropdown.Item>
<Dropdown.Item href="#">09-07-2021</Dropdown.Item>
</Dropdown.Menu>
</Dropdown>
<Dropdown className="d-inline mx-2">
<Dropdown.Toggle id="dropdown-autoclose-true">Category</Dropdown.Toggle>
<Dropdown.Menu>
<Dropdown.Item href="#">General</Dropdown.Item>
<Dropdown.Item href="#">Advertising</Dropdown.Item>
<Dropdown.Item href="#">Legal</Dropdown.Item>
</Dropdown.Menu>
</Dropdown>
<div className="d-inline mx-5"></div>
<div className="d-inline mx-5"></div>
<div className="d-inline mx-5"></div>
</div>
);
}
import React, { Component } from "react";
import { Navbar, Nav } from "react-bootstrap";
import { NavLink } from "react-router-dom";
export default class Navigation extends Component {
render() {
return (
<div>
<Navbar bg="dark" expand="lg">
<Navbar.Toggle aria-controls="basic-navbar-nav" />
<Navbar.Collapse id="basic-Navbar-nav">
<Nav>
<NavLink className="d-inline p-2 bg-dark text-white" to="/">
Latest
</NavLink>
<NavLink
className="d-inline p-2 bg-dark text-white"
to="/gazette"
>
All Gazettes
</NavLink>
<NavLink
className="d-inline p-2 bg-dark text-white"
to="/vacancy"
>
Vacancies
</NavLink>
<NavLink className="d-inline p-2 bg-dark text-white" to="/exam">
Examinations
</NavLink>
</Nav>
</Navbar.Collapse>
</Navbar>
</div>
);
}
}
import React, { useState, useEffect } from "react";
function Pagination({
data,
RenderComponent,
title,
pageLimit,
dataLimit,
query,
}) {
const [pages] = useState(Math.round(data.length / dataLimit));
const [currentPage, setCurrentPage] = useState(1);
useEffect(() => {
window.scrollTo({ behavior: "smooth", top: "0px" });
}, [currentPage]);
function goToNextPage() {
setCurrentPage((page) => page + 1);
}
function goToPreviousPage() {
setCurrentPage((page) => page - 1);
}
function changePage(event) {
const pageNumber = Number(event.target.textContent);
setCurrentPage(pageNumber);
}
const getPaginatedData = () => {
const startIndex = currentPage * dataLimit - dataLimit;
const endIndex = startIndex + dataLimit;
return data.slice(startIndex, endIndex);
};
const getPaginationGroup = () => {
let start = Math.floor((currentPage - 1) / pageLimit) * pageLimit;
return new Array(pageLimit).fill().map((_, idx) => start + idx + 1);
};
return (
<div style={{ paddingBottom: 20 }}>
<h4
style={{ display: "flex", justifyContent: "center", paddingBottom: 10 }}
>
{title}
</h4>
{/* show the posts, 10 posts at a time */}
<div className="dataContainer">
{getPaginatedData().map((d, idx) => (
<RenderComponent key={idx} data={d} query={query} />
))}
</div>
{/* show the pagiantion
it consists of next and previous buttons
along with page numbers, in our case, 5 page
numbers at a time
*/}
<div className="pagination" style={{ paddingTop: 20, paddingBottom: 20 }}>
{/* previous button */}
<button
onClick={goToPreviousPage}
className={`prev ${currentPage === 1 ? "disabled" : ""}`}
>
prev
</button>
{/* show page numbers */}
{getPaginationGroup().map((item, index) => (
<button
key={index}
onClick={changePage}
className={`paginationItem ${
currentPage === item ? "active" : null
}`}
>
<span>{item}</span>
</button>
))}
{/* next button */}
<button
onClick={goToNextPage}
className={`next ${currentPage === pages ? "disabled" : ""}`}
>
next
</button>
</div>
</div>
);
}
export default Pagination;
import React from "react";
class Popup extends React.Component {
render() {
return (
<div className="popup">
<div className="popup_open">
<button onClick={this.props.closePopup}>X</button>
<h4>Full Description</h4>
<p style={{ fontSize: 12 }}>{this.props.text}</p>
</div>
</div>
);
}
}
export default Popup;
import React from "react";
const PopupView = (props) => {
return (
<div className="popup-box">
<div className="box">
<span className="close-icon" onClick={props.handleClose}>
x
</span>
{props.content}
</div>
</div>
);
};
export default PopupView;
import React, { Component } from "react";
import PowerbiEmbedded from "powerbi-client-react";
import data from "./data";
class PowerBi extends Component {
onEmbedded = (_dataRecived) => {
console.log("data", _dataRecived);
};
render() {
// token type 1 is embedTokenURL
// token type 0 is ADD token
return (
<div className="App">
<PowerbiEmbedded
id={`${data.reportID}`}
embedUrl={`${data.embedUrl}`}
accessToken={`${data.accessToken}`}
filterPaneEnabled={false}
navContentPaneEnabled={false}
tokenType={1}
width="600px"
height="900px"
onEmbedded={this.onEmbedded}
/>
</div>
);
}
}
export default PowerBi;
import React, { useEffect, useState } from "react";
import Container from "react-bootstrap/Container";
import Row from "react-bootstrap/Row";
import Col from "react-bootstrap/Col";
import Form from "react-bootstrap/Form";
import FormCheck from "react-bootstrap/FormCheck";
import ShowMoreText from "react-show-more-text";
import { Button } from "react-bootstrap";
import "reactjs-popup/dist/index.css";
import { NavLink } from "react-router-dom";
import Popup from "./Popup";
import Loader from "react-loader-spinner";
import { usePromiseTracker } from "react-promise-tracker";
import { trackPromise } from "react-promise-tracker";
const LoadingIndicator = (props) => {
const { promiseInProgress } = usePromiseTracker();
return (
promiseInProgress && (
<>
<div
style={{
width: "100%",
height: "100%",
display: "flex",
justifyContent: "center",
alignItems: "center",
padding: 20,
}}
>
<Loader type="ThreeDots" color="#666666" height="50" width="50" />
&nbsp;Reading Data... Please Wait &nbsp;
<Loader type="ThreeDots" color="#666666" height="50" width="50" />
</div>
</>
)
);
};
export default function Vacancy() {
const [vac, setVac] = useState([]);
const [filteredData, setFilteredData] = useState(vac);
const [selectedClient, setSelectedClient] = useState("Academic");
const [showPopup, setshowPopup] = useState(false);
function handleSelectChange(event) {
setSelectedClient(event.target.value);
fetchVacancy();
fetchVacancy();
}
function fetchVacancy() {
trackPromise(
fetch(process.env.REACT_APP_API + "postvacancy/" + selectedClient)
.then(console.log("done"))
.then((response) => response.json())
.then((data) => {
setVac(data);
setFilteredData(data);
})
);
}
useEffect(() => {
fetchVacancy();
return () => {};
}, []);
function executeOnClick(isExpanded) {
console.log(isExpanded);
}
const togglePopup = () => {
setshowPopup((showPopup) => !showPopup);
};
return (
<>
<div>
<Form>
<Container className="p-2 vacancy-container">
<Row md={4}>
<Col md={2} className="">
<div key={1} className="mb-3">
<FormCheck
type="radio"
label="Job Category"
name="g"
checked={console.log("checked")}
// onChange={console.log("changed")}
/>
</div>
</Col>
<Col xs={4}>
<Form.Select
aria-label="Default select example"
value={selectedClient}
onChange={handleSelectChange}
>
<option value="Other">Academic</option>
<option value="Academic">Administration</option>
<option value="Administration">Engineering</option>
<option value="Engineering">Healthcare</option>
<option value="Healthcare">Operations</option>
<option value="Operations">Other</option>
</Form.Select>
</Col>
</Row>
</Container>
</Form>
<Container>
<LoadingIndicator />
{filteredData.map((ss) => (
<>
{/* {text = ss.summary.substr(0,10)} */}
<Row>
<Col className=" pt-2 title-text">
<NavLink to="/gazetteDetails">{ss.title}</NavLink>
{/**show full description */}
</Col>
</Row>
<Row className="pt-1 px-2 sub-title-text-2">
{ss.summary}
<br />
<button onClick={togglePopup.bind()}>
Read Full Description
</button>
{showPopup ? (
<Popup
text={ss.description}
closePopup={togglePopup.bind()}
/>
) : (
<span style={{ fontWeight: 600 }}>
<a style={{ textDecoration: "none" }} href={ss.url}>
Go to original Gazette PDF
</a>
</span>
)}
<br />
</Row>
{/* <Row className="p-2">{ss.summary}</Row> */}
</>
))}
</Container>
</div>
</>
);
}
import React, { useEffect, useState } from "react";
import Container from "react-bootstrap/Container";
import Row from "react-bootstrap/Row";
import Col from "react-bootstrap/Col";
import Form from "react-bootstrap/Form";
import { Button } from "react-bootstrap";
import "reactjs-popup/dist/index.css";
import { NavLink } from "react-router-dom";
import Popup from "./Popup";
import Loader from "react-loader-spinner";
import { usePromiseTracker } from "react-promise-tracker";
import { trackPromise } from "react-promise-tracker";
const LoadingIndicator = (props) => {
const { promiseInProgress } = usePromiseTracker();
return (
promiseInProgress && (
<>
<div
style={{
width: "100%",
height: "100%",
display: "flex",
justifyContent: "center",
alignItems: "center",
padding: 20,
}}
>
<Loader type="ThreeDots" color="#666666" height="50" width="50" />
&nbsp;Reading Data... Please Wait &nbsp;
<Loader type="ThreeDots" color="#666666" height="50" width="50" />
</div>
</>
)
);
};
export default function Vacancy() {
const [vac, setVac] = useState([]);
const [filteredData, setFilteredData] = useState(vac);
const [selectedClient, setSelectedClient] = useState("");
const [showPopup, setshowPopup] = useState(false);
function handleSelectChange(event) {
setSelectedClient(event.target.value);
fetchVacancy();
fetchVacancy();
}
function fetchVacancy() {
trackPromise(
fetch(process.env.REACT_APP_API + "vacancy/" + selectedClient)
.then(console.log("done"))
.then((response) => response.json())
.then((data) => {
setVac(data);
setFilteredData(data);
})
);
}
useEffect(() => {
fetchVacancy();
return () => {};
}, []);
function refreshData() {
trackPromise(
fetch(process.env.REACT_APP_API + "refreshClustering_Vacancy/")
.then(console.log("done"))
.then((response) => response.json())
.then((data) => {
// setVac(data);
// setFilteredData(data);
})
);
}
const togglePopup = () => {
setshowPopup((showPopup) => !showPopup);
};
return (
<>
<div>
<Form>
<Container className="p-2 vacancy-container">
<Row md={4}>
<Col md={2} className="">
<div key={1} className="mb-3">
<Form.Label style={{ padding: 5 }}>
Select Job Category
</Form.Label>
</div>
</Col>
<Col xs={4}>
<Form.Select
aria-label="Default select example"
value={selectedClient}
onChange={handleSelectChange}
>
<option value="Select">-Select-</option>
<option value="Academic" onClick={handleSelectChange}>
Academic
</option>
<option value="Administrative" onClick={handleSelectChange}>
Administrative
</option>
<option value="Engineering" onClick={handleSelectChange}>
Engineering
</option>
<option value="Healthcare" onClick={handleSelectChange}>
Healthcare
</option>
<option value="Operations" onClick={handleSelectChange}>
Operations
</option>
<option value="Other" onClick={handleSelectChange}>
Other
</option>
</Form.Select>
</Col>
</Row>
<Row>
<Col md={{ span: 3, offset: 3 }}></Col>
<Col md={{ span: 3, offset: 3 }}>
<Button onClick={refreshData}>Refresh Vacancies</Button>
</Col>
</Row>
</Container>
</Form>
<Container>
<LoadingIndicator />
{filteredData.map((ss) => (
<>
{/* {text = ss.summary.substr(0,10)} */}
<Row>
<Col className=" pt-2 title-text">
<span>{ss.title}</span>
{/**show full description */}
</Col>
</Row>
<Row className="pt-1 px-2 sub-title-text-2">
{ss.summary}
<br />
<button onClick={togglePopup.bind()}>
Read Full Description
</button>
{showPopup ? (
<Popup
text={ss.description}
closePopup={togglePopup.bind()}
/>
) : (
<span style={{ fontWeight: 600 }}>
<a
style={{ textDecoration: "none" }}
href={ss.url}
target="_blank"
>
Go to original Gazette PDF
</a>
</span>
)}
<br />
</Row>
{/* <Row className="p-2">{ss.summary}</Row> */}
</>
))}
</Container>
</div>
</>
);
}
\ No newline at end of file
const data = {
labels: [
"2021.09.02",
"2021.08.02",
"2021.07.02",
"2021.06.02",
"2021.05.02",
],
datasets: [
{
label: "White Sugar",
data: ["125.00", "122.00", "108.00", "102.00", "100.00"],
borderColor: "green",
},
{
label: "Brown or Red Sugar",
data: ["128.00", "125.00", "115.00", "116.00", "115.00"],
borderColor: "rgb(92,88,12)",
},
{
label: "Keeri Samba",
data: ["125.00", "120.00", "115.00", "110.00", "120.00"],
borderColor: "blue",
},
{
label: "White/Red Samba Rice",
data: ["103.00", "100.00", "110.00", "120.00", "120.00"],
borderColor: "red",
},
{
label: "White/Red Nadu Rice",
data: ["98.00", "95.00", "102.00", "95.00", "86.00"],
borderColor: "black",
},
{
label: "White/Red Raw Rice",
data: ["95.00", "90.00", "105.00", "104.00", "105.00"],
borderColor: "rgb(192,08,12)",
},
],
};
export default data;
import InputGroup from "react-bootstrap/InputGroup";
import Button from "react-bootstrap/Button";
import FormControl from "react-bootstrap/FormControl";
const Search = ({ searchQuery, setSearchQuery }) => (
<InputGroup className="mb-3">
<FormControl
placeholder="Start typing..."
aria-label="sq"
aria-describedby="basic-addon2"
/>
<Button variant="outline-secondary" id="button-addon2">
Search Now
</Button>
</InputGroup>
);
export default Search;
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
code {
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
monospace;
}
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import reportWebVitals from './reportWebVitals';
ReactDOM.render(
<React.StrictMode>
<App />
</React.StrictMode>,
document.getElementById('root')
);
// 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();
<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';
This diff is collapsed.
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