├── .gitignore
├── README.md
├── package-lock.json
├── package.json
├── public
├── favicon.ico
├── favicon.png
├── index.html
├── logo192.png
├── logo512.png
├── manifest.json
└── robots.txt
├── src
├── App.css
├── App.js
├── App.test.js
├── assets
│ └── logo.png
├── components
│ ├── Filters.js
│ ├── List.js
│ ├── MultiSelect.js
│ ├── Project.js
│ ├── SearchBar.js
│ └── Station.js
├── constants
│ ├── branch.js
│ └── industry.js
├── data
│ ├── extractIndustries.js
│ └── ps1_data.json
├── index.css
├── index.js
├── logo.svg
├── reportWebVitals.js
└── setupTests.js
└── yarn.lock
/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | # misc
15 | .DS_Store
16 | .env.local
17 | .env.development.local
18 | .env.test.local
19 | .env.production.local
20 |
21 | npm-debug.log*
22 | yarn-debug.log*
23 | yarn-error.log*
24 |
25 | old.json
26 | result.json
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # ps1data
2 | Pretty interface to navigate through PS1 stations at BITS Pilani
3 |
4 | ## Disclaimer
5 | Given that I had to do this whole thing in about 18 hours, this has to be some of the worst code I've ever written. Especially state management - this has really poor state management. But then again, didn't really have the time to sit and think about design decisions.
6 |
7 | Pls don't judge 👉 👈
8 |
9 | [dush-t](https://github.com/dush-t)
10 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ps1data",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "@chakra-ui/react": "^1.6.1",
7 | "@emotion/react": "^11.1.5",
8 | "@emotion/styled": "^11.3.0",
9 | "@testing-library/jest-dom": "^5.11.4",
10 | "@testing-library/react": "^11.1.0",
11 | "@testing-library/user-event": "^12.1.10",
12 | "framer-motion": "^4.1.11",
13 | "fuse.js": "^6.4.6",
14 | "immutability-helper": "^3.1.1",
15 | "lodash": "^4.17.21",
16 | "react": "^17.0.2",
17 | "react-csv": "^2.0.3",
18 | "react-dom": "^17.0.2",
19 | "react-ga": "^3.3.0",
20 | "react-github-btn": "^1.2.0",
21 | "react-github-button": "^0.1.11",
22 | "react-github-buttons": "^0.5.0",
23 | "react-icons": "^4.2.0",
24 | "react-router-dom": "^5.2.0",
25 | "react-scripts": "4.0.3",
26 | "react-select": "^4.3.0",
27 | "web-vitals": "^1.0.1"
28 | },
29 | "scripts": {
30 | "start": "react-scripts --max_old_space_size=4096 start",
31 | "build": "react-scripts build",
32 | "test": "react-scripts test",
33 | "eject": "react-scripts eject"
34 | },
35 | "eslintConfig": {
36 | "extends": [
37 | "react-app",
38 | "react-app/jest"
39 | ]
40 | },
41 | "browserslist": {
42 | "production": [
43 | ">0.2%",
44 | "not dead",
45 | "not op_mini all"
46 | ],
47 | "development": [
48 | "last 1 chrome version",
49 | "last 1 firefox version",
50 | "last 1 safari version"
51 | ]
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bitsacm/ps1data/a7bb456f67fe3a3109fcd900fbd2653bc80c5153/public/favicon.ico
--------------------------------------------------------------------------------
/public/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bitsacm/ps1data/a7bb456f67fe3a3109fcd900fbd2653bc80c5153/public/favicon.png
--------------------------------------------------------------------------------
/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
9 |
18 |
19 |
20 |
21 |
22 |
26 |
27 |
31 |
32 |
41 | PS1 Assist
42 |
43 |
44 |
45 |
46 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/public/logo192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bitsacm/ps1data/a7bb456f67fe3a3109fcd900fbd2653bc80c5153/public/logo192.png
--------------------------------------------------------------------------------
/public/logo512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bitsacm/ps1data/a7bb456f67fe3a3109fcd900fbd2653bc80c5153/public/logo512.png
--------------------------------------------------------------------------------
/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "short_name": "React App",
3 | "name": "Create React App Sample",
4 | "icons": [
5 | {
6 | "src": "favicon.ico",
7 | "sizes": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | },
10 | {
11 | "src": "logo192.png",
12 | "type": "image/png",
13 | "sizes": "192x192"
14 | },
15 | {
16 | "src": "logo512.png",
17 | "type": "image/png",
18 | "sizes": "512x512"
19 | }
20 | ],
21 | "start_url": ".",
22 | "display": "standalone",
23 | "theme_color": "#000000",
24 | "background_color": "#ffffff"
25 | }
26 |
--------------------------------------------------------------------------------
/public/robots.txt:
--------------------------------------------------------------------------------
1 | # https://www.robotstxt.org/robotstxt.html
2 | User-agent: *
3 | Disallow:
4 |
--------------------------------------------------------------------------------
/src/App.css:
--------------------------------------------------------------------------------
1 | .App {
2 | text-align: center;
3 | }
4 |
5 | .App-logo {
6 | height: 40vmin;
7 | pointer-events: none;
8 | }
9 |
10 | @media (prefers-reduced-motion: no-preference) {
11 | .App-logo {
12 | animation: App-logo-spin infinite 20s linear;
13 | }
14 | }
15 |
16 | .App-header {
17 | background-color: #282c34;
18 | min-height: 100vh;
19 | display: flex;
20 | flex-direction: column;
21 | align-items: center;
22 | justify-content: center;
23 | font-size: calc(10px + 2vmin);
24 | color: white;
25 | }
26 |
27 | .App-link {
28 | color: #61dafb;
29 | }
30 |
31 | @keyframes App-logo-spin {
32 | from {
33 | transform: rotate(0deg);
34 | }
35 | to {
36 | transform: rotate(360deg);
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/App.js:
--------------------------------------------------------------------------------
1 | import React, { useState, useCallback, useEffect } from 'react'
2 | import _, { transform } from 'lodash'
3 | import data from './data/ps1_data.json'
4 | import { Box, Flex } from '@chakra-ui/layout';
5 | import Fuse from 'fuse.js'
6 | import { Star } from 'react-github-buttons'
7 | import GitHubButton from 'react-github-btn'
8 | import { CSVLink } from 'react-csv'
9 | import {
10 | Button,
11 | Popover,
12 | PopoverTrigger,
13 | PopoverContent,
14 | PopoverHeader,
15 | PopoverBody,
16 | PopoverFooter,
17 | PopoverArrow,
18 | PopoverCloseButton,
19 | } from '@chakra-ui/react'
20 | import List from './components/List';
21 | import Filters from './components/Filters'
22 | import SearchBar from './components/SearchBar';
23 | import industryColors from './constants/industry'
24 | import branchColors from './constants/branch'
25 | import Logo from './assets/logo.png'
26 |
27 | const SEARCH_DEBOUNCE_PERIOD = 10
28 |
29 | var data1=[];
30 |
31 | for(var i =0; i {
49 | console.log('We wrote quite a bit of spaghetti code to finish this in a single day, of course you can hack us :/')
50 | const industryOpts = {}
51 | Object.keys(industryColors).forEach((key) => {
52 | industryOpts[key] = {
53 | selected: true,
54 | color: industryColors[key],
55 | value: key,
56 | label: key
57 | }
58 | })
59 |
60 | const branchOpts = {}
61 | Object.keys(branchColors).forEach((key) => {
62 | branchOpts[key] = {
63 | selected: true,
64 | color: branchColors[key],
65 | value: key,
66 | label: key
67 | }
68 | })
69 |
70 | setIndustries(industryOpts)
71 | setBranches(branchOpts)
72 | }, [])
73 |
74 | const options = {
75 | keys: [
76 | {
77 | name: 'name',
78 | weight: 10
79 | },
80 | {
81 | name: 'projects.title',
82 | weight: 4
83 | },
84 | {
85 | name: 'projects.description',
86 | weight: 2
87 | }
88 | ]
89 | }
90 | const searchIndex = Fuse.createIndex(options.keys, stations)
91 | const fuse = new Fuse(stations, options, searchIndex)
92 |
93 | function onSearch(query) {
94 | if (query === '') {
95 | return data
96 | }
97 | const results = fuse.search(query).map(({ item }) => item)
98 | return results
99 | }
100 |
101 | const performSearch = useCallback(_.debounce((query) => {
102 | const results = onSearch(query)
103 | setStations(results)
104 | }, SEARCH_DEBOUNCE_PERIOD), [])
105 |
106 | function onSearchValueChange(query) {
107 | performSearch(query)
108 | }
109 |
110 |
111 | function toggleSelect(type, itemVal, selected) {
112 | console.log('brah', itemVal)
113 | if (type === 'INDUSTRY') {
114 | const newInds = {...industries}
115 | newInds[itemVal].selected = selected
116 | setIndustries(newInds)
117 | } else if (type === 'BRANCH') {
118 | console.log(itemVal)
119 | const newBranches = {...branches}
120 | newBranches[itemVal].selected = selected
121 | setBranches(newBranches)
122 | }
123 | }
124 |
125 | function convertProjectsToString(projects) {
126 | let result = ''
127 | projects.forEach((proj, idx) => {
128 | result += `
129 | Project #${idx+1}
130 | ${proj.title}
131 |
132 | ${proj.description}
133 |
134 | Branches: ${proj.preferredDisciplines.join(', ')}\n\n\n
135 | `
136 | })
137 |
138 | return result
139 | }
140 |
141 | function exportCsv() {
142 | console.log('Generating CSV')
143 | if (Object.keys(industries).length > 0 && Object.keys(branches).length > 0) {
144 | const data = []
145 | data.push(['name', 'industry', 'branches', 'projects'])
146 | const interests = JSON.parse(localStorage.getItem('interesting'))
147 | stations.forEach((station) => {
148 | if (industries[station.industry].selected
149 | && station.branches.some((branch) => branches[branch]?.selected
150 | || (branch.toUpperCase() === 'ANY') && branches['Any'].selected)) {
151 |
152 | if (interestingToggle) {
153 | if (!interests[station.stationId]) {
154 | return
155 | }
156 | }
157 |
158 | data.push([station.name, station.industry, station.branches, convertProjectsToString(station.projects)])
159 | }
160 | })
161 |
162 | return data
163 | } else {
164 | return []
165 | }
166 | }
167 |
168 | const [dis1, setDis1]= useState(true);
169 | const [dis2, setDis2]= useState(false);
170 | const setNew = () =>{
171 | setStations(data1);
172 | setDis1(false);
173 | setDis2(true);
174 | }
175 |
176 | const setBack = () =>{
177 | setStations(data);
178 | setDis1(true);
179 | setDis2(false);
180 | }
181 |
182 |
183 | return (
184 |
188 |
192 |
195 |
198 |
206 |
207 |
213 |
216 |
217 |
223 | Star this on GitHub!
224 |
225 |
226 |
231 | Now that you're here, we might as well plug
232 | The BITS-ACM Blog too.
233 |
234 |
235 |
241 |
248 |
251 |
254 |
257 |
260 |
261 |
269 |
270 |
271 |
272 |
273 | CSV Generated
274 |
275 |
288 |
289 |
290 |
291 |
292 |
298 |
305 |
306 |
307 |
308 |
309 |
310 | );
311 | }
312 |
313 | export default App;
314 |
--------------------------------------------------------------------------------
/src/App.test.js:
--------------------------------------------------------------------------------
1 | import { render, screen } from '@testing-library/react';
2 | import App from './App';
3 |
4 | test('renders learn react link', () => {
5 | render();
6 | const linkElement = screen.getByText(/learn react/i);
7 | expect(linkElement).toBeInTheDocument();
8 | });
9 |
--------------------------------------------------------------------------------
/src/assets/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bitsacm/ps1data/a7bb456f67fe3a3109fcd900fbd2653bc80c5153/src/assets/logo.png
--------------------------------------------------------------------------------
/src/components/Filters.js:
--------------------------------------------------------------------------------
1 | import { Box } from '@chakra-ui/layout'
2 | import { Switch } from '@chakra-ui/switch'
3 | import React from 'react'
4 | import Select from 'react-select'
5 | import MultiSelect from './MultiSelect'
6 |
7 | const Filters = (props) => {
8 | return (
9 |
24 |
30 | FILTER BY INDUSTRY
31 |
32 |
35 | props.toggleSelect('INDUSTRY', value, selected)}
38 | // toggleSelect={(idx, selected) => console.log('bruh')}
39 | />
40 |
41 |
48 | FILTER BY BRANCH
49 |
50 |
53 | props.toggleSelect('BRANCH', value, selected)}
56 | // toggleSelect={(idx, selected) => console.log('bruh')}
57 | />
58 |
59 |
60 |
67 | SHOW ONLY INTERESTING
68 |
69 |
72 | props.setInterestingToggle(e.target.checked)}
74 | />
75 |
76 |
81 | Toggling this could be a little slow :(
82 |
83 |
84 | )
85 | }
86 |
87 | export default Filters
88 |
--------------------------------------------------------------------------------
/src/components/List.js:
--------------------------------------------------------------------------------
1 | import React, { useEffect, useState } from 'react'
2 | import data from '../data/ps1_data.json'
3 |
4 | import Station from './Station'
5 | import {
6 | Box,
7 | Flex,
8 | Table,
9 | Thead,
10 | Tbody,
11 | Tr,
12 | Th,
13 | TableCaption,
14 | } from "@chakra-ui/react"
15 |
16 | const List = (props) => {
17 | const [interests, setInterests] = useState({})
18 | const { industryFilters, branchFilters } = props
19 | const stationComps = []
20 |
21 | useEffect(() => {
22 | let interesting = JSON.parse(localStorage.getItem('interesting'))
23 | if (!interesting) interesting = {}
24 |
25 | setInterests(interesting)
26 | }, [props.interestingToggle])
27 |
28 | if (Object.keys(industryFilters).length > 0 && Object.keys(branchFilters).length > 0) {
29 | // console.log(industryFilters)
30 | let idx = 0
31 | props.stations.forEach((station) => {
32 | if (industryFilters[station.industry].selected
33 | && station.branches.some((branch) => branchFilters[branch]?.selected
34 | || (branch.toUpperCase() === 'ANY') && branchFilters['Any'].selected)) {
35 |
36 | if (props.interestingToggle) {
37 | if (!interests[station.stationId]) {
38 | return
39 | }
40 | }
41 | stationComps.push(
42 |
51 | )
52 | }
53 | })
54 | }
55 |
56 | return (
57 |
65 |
71 |
74 | PS-1 Stations
75 |
76 |
77 | S. no |
78 | Name |
79 | Industry |
80 | Branches |
81 | Interesting |
82 |
83 |
84 |
85 | {stationComps}
86 |
87 |
88 |
89 |
90 | )
91 | }
92 |
93 | export default List
--------------------------------------------------------------------------------
/src/components/MultiSelect.js:
--------------------------------------------------------------------------------
1 | import { Badge, Box } from '@chakra-ui/layout'
2 | import React from 'react'
3 |
4 | const MultiSelect = (props) => {
5 | return (
6 |
7 | {
8 | Object.keys(props.items).map((key) => {
9 | const item = props.items[key]
10 | return (
11 | props.toggleSelect(key, !item.selected)}
17 | cursor='pointer'
18 | >
19 | {item.label}
20 |
21 | )
22 | })
23 | }
24 |
25 | )
26 | }
27 |
28 | export default MultiSelect
--------------------------------------------------------------------------------
/src/components/Project.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import {
3 | Box,
4 | Divider,
5 | Badge,
6 | HStack
7 | } from '@chakra-ui/layout'
8 |
9 | import branchColors from '../constants/branch'
10 |
11 | const Project = (props) => {
12 | return (
13 |
18 |
25 | Project #{props.idx+1}
26 |
27 |
28 |
32 | {props.data.title}
33 |
34 |
35 |
41 | {props.data.description}
42 |
43 |
44 |
51 | For branches:
52 |
53 | {
54 | props.data.preferredDisciplines.map((disc) => (
55 | {disc}
56 | ))
57 | }
58 |
59 |
60 |
61 |
62 |
63 | )
64 | }
65 |
66 | export default Project
--------------------------------------------------------------------------------
/src/components/SearchBar.js:
--------------------------------------------------------------------------------
1 | import React, { useCallback } from 'react'
2 | import {
3 | Box,
4 | Input,
5 | Stack,
6 | InputGroup,
7 | InputLeftElement,
8 | Button
9 | } from "@chakra-ui/react"
10 |
11 | import { FiSearch } from 'react-icons/fi'
12 | import { FaSearch } from 'react-icons/fa'
13 |
14 |
15 | const SearchBar = (props) => {
16 | const Icon = (
17 |
18 |
19 |
20 | )
21 |
22 | return (
23 |
28 |
29 | }
32 | children={}
33 | />
34 | props.onSearch(e.target.value)}
39 | // value={props.value}
40 | />
41 |
42 |
43 | )
44 | }
45 |
46 | export default SearchBar
--------------------------------------------------------------------------------
/src/components/Station.js:
--------------------------------------------------------------------------------
1 | import React, { useRef } from 'react'
2 |
3 | import {
4 | Tr,
5 | Td,
6 | Drawer,
7 | DrawerBody,
8 | DrawerFooter,
9 | DrawerHeader,
10 | DrawerOverlay,
11 | DrawerContent,
12 | DrawerCloseButton,
13 | Badge,
14 | Box,
15 | Switch,
16 |
17 | useDisclosure,
18 | HStack,
19 | CloseButton
20 | } from "@chakra-ui/react"
21 |
22 |
23 | import Project from './Project'
24 | import branchColors from '../constants/branch'
25 | import industryColors from '../constants/industry'
26 |
27 | const Station = (props) => {
28 | const { name, location, industry, projects, branches, stationId, } = props.data
29 |
30 | const { isOpen, onOpen, onClose } = useDisclosure()
31 |
32 | const branchTags = (
33 |
36 | {
37 | branches.map((branch) => (
38 |
43 | {branch}
44 |
45 | ))
46 | }
47 |
48 | )
49 |
50 | function handleInterestingToggle(stationId, checked) {
51 | let interesting = JSON.parse(localStorage.getItem('interesting'))
52 | if (interesting === null) {
53 | interesting = {}
54 | }
55 | if (checked) {
56 | interesting[stationId] = true
57 | } else {
58 | delete interesting[stationId]
59 | }
60 | // props.setInterests(interesting)
61 | localStorage.setItem('interesting', JSON.stringify(interesting))
62 | return interesting
63 | }
64 |
65 | function removeInteresting(stationId) {
66 | const interesting = handleInterestingToggle(stationId, false)
67 | props.setNumInteresting((new Date()).getTime())
68 | props.setInterests(interesting)
69 | }
70 |
71 | return (
72 | <>
73 |
79 | {props.idx + 1} |
80 |
81 | {
82 | props.data.new
83 | ? New
84 | : null
85 | }
86 |
87 | {name}
88 |
89 | |
90 |
91 |
92 | {
93 | {industry}
94 | }
95 | |
96 |
97 | {branchTags}
98 | |
99 |
100 |
101 | {stationId}
102 |
103 | {
104 | props.interestingToggle
105 | ?
106 | removeInteresting(stationId)}
108 | />
109 |
110 | : handleInterestingToggle(stationId, e.target.checked)}
112 | defaultChecked={props.interesting}
113 | />
114 | }
115 | |
116 |
117 |
118 |
119 |
120 |
127 |
128 |
129 |
130 |
133 |
137 | {name}
138 |
139 |
143 | {industry}
144 |
145 |
149 | @{location}
150 |
151 |
152 |
153 |
154 |
155 |
156 | {
157 | projects.map((proj, idx) => )
158 | }
159 |
160 |
161 |
162 |
167 | We know the data is ugly. Blame PSD.
168 |
169 |
170 |
171 |
172 |
173 | >
174 | )
175 | }
176 |
177 | export default Station
178 |
--------------------------------------------------------------------------------
/src/constants/branch.js:
--------------------------------------------------------------------------------
1 | const branches = {
2 | Any: 'gray',
3 | AA: 'orange',
4 | AB: 'orange',
5 | A1: 'yellow',
6 | A2: 'pink',
7 | A3: 'purple',
8 | A4: 'orange',
9 | A5: 'red',
10 | A7: 'teal',
11 | A8: 'green',
12 | B1: 'yellow',
13 | B2: 'yellow',
14 | B3: 'yellow',
15 | B4: 'pink',
16 | B5: 'cyan',
17 | C6: 'yellow'
18 | }
19 |
20 | export const branchOpts = Object.keys(branches).map((key) => {
21 | return {
22 | value: key,
23 | label: key,
24 | color: branches[key],
25 | selected: true
26 | }
27 | })
28 |
29 | export default branches
--------------------------------------------------------------------------------
/src/constants/industry.js:
--------------------------------------------------------------------------------
1 | const industries = {
2 | Electronics: 'purple',
3 | 'Finance and Mgmt': 'linkedin',
4 | Mechanical: 'orange',
5 | Chemical: 'pink',
6 | Cement: 'yellow',
7 | Infrastructure: 'yellow',
8 | IT: 'teal',
9 | 'Computer Science': 'teal',
10 | 'Health Care': 'red',
11 | 'Govt Research Lab': 'blue',
12 | Steel: 'yellow',
13 | Others: '',
14 | '': ''
15 | }
16 |
17 | export default industries
--------------------------------------------------------------------------------
/src/data/extractIndustries.js:
--------------------------------------------------------------------------------
1 | const data = require('./result.json')
2 | const old = require('./ps1_data.json')
3 | const fs = require('fs')
4 | const path = require('path')
5 |
6 | const industries = {}
7 | data.forEach(({ industry }) => industries[industry] = true)
8 |
9 | const oldStations = {}
10 | old.forEach(({stationId}) => oldStations[stationId] = true)
11 | console.log(oldStations)
12 |
13 | data.forEach((station) => {
14 | if (!station.projects) {
15 | return
16 | }
17 | let branches = {}
18 | station.projects.forEach((proj) => {
19 | proj.preferredDisciplines.forEach((disc) => branches[disc] = true)
20 | })
21 | branches = Object.keys(branches)
22 | station.branches = branches
23 | })
24 |
25 | function cleanArray(array) {
26 | let clArray = {}
27 | array.forEach((item) => {
28 | item.split(' ').forEach((cl) => clArray[cl] = true)
29 | })
30 | return Object.keys(clArray)
31 | }
32 |
33 | data.forEach((station) => {
34 | if (!station.projects) return
35 | station.branches = cleanArray(station.branches)
36 | station.projects.forEach((proj) => proj.preferredDisciplines = cleanArray(proj.preferredDisciplines))
37 | })
38 |
39 | data.forEach((station) => {
40 | if (!oldStations[station.stationId]) {
41 | station.new = true
42 | } else {
43 | station.new = false
44 | }
45 | })
46 |
47 | fs.writeFileSync(
48 | path.join(__dirname, 'ps1_data1.json'),
49 | JSON.stringify(data, null, 4)
50 | )
51 |
52 | console.log(data.length)
53 |
54 | console.log(industries)
--------------------------------------------------------------------------------
/src/index.css:
--------------------------------------------------------------------------------
1 | body {
2 | margin: 0;
3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
5 | sans-serif;
6 | -webkit-font-smoothing: antialiased;
7 | -moz-osx-font-smoothing: grayscale;
8 | }
9 |
10 | code {
11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
12 | monospace;
13 | }
14 |
--------------------------------------------------------------------------------
/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import './index.css';
4 | import App from './App';
5 | import reportWebVitals from './reportWebVitals';
6 | import { ChakraProvider } from "@chakra-ui/react"
7 |
8 | ReactDOM.render(
9 |
10 |
11 |
12 |
13 | ,
14 | document.getElementById('root')
15 | );
16 |
17 | // If you want to start measuring performance in your app, pass a function
18 | // to log results (for example: reportWebVitals(console.log))
19 | // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
20 | reportWebVitals();
21 |
--------------------------------------------------------------------------------
/src/logo.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/reportWebVitals.js:
--------------------------------------------------------------------------------
1 | const reportWebVitals = onPerfEntry => {
2 | if (onPerfEntry && onPerfEntry instanceof Function) {
3 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
4 | getCLS(onPerfEntry);
5 | getFID(onPerfEntry);
6 | getFCP(onPerfEntry);
7 | getLCP(onPerfEntry);
8 | getTTFB(onPerfEntry);
9 | });
10 | }
11 | };
12 |
13 | export default reportWebVitals;
14 |
--------------------------------------------------------------------------------
/src/setupTests.js:
--------------------------------------------------------------------------------
1 | // jest-dom adds custom jest matchers for asserting on DOM nodes.
2 | // allows you to do things like:
3 | // expect(element).toHaveTextContent(/react/i)
4 | // learn more: https://github.com/testing-library/jest-dom
5 | import '@testing-library/jest-dom';
6 |
--------------------------------------------------------------------------------