diff --git a/components/arcade/showcase/project-view.js b/components/arcade/showcase/project-view.js index 6156a4f8..19dffd3c 100644 --- a/components/arcade/showcase/project-view.js +++ b/components/arcade/showcase/project-view.js @@ -51,6 +51,7 @@ const ProjectView = ({ screenshot = '', video = '', readMeLink = '', + preview, ...props }) => { const [darkColor, setDarkColor] = useState('#000000') @@ -101,7 +102,13 @@ const ProjectView = ({
- - View all my ships - + {preview ? ( + <> + ) : ( + + View all my ships + + )}
- { image != '' && ( + {image != '' && (
- Project Image + Project Image
)} @@ -237,7 +244,6 @@ const ProjectView = ({

-
) } diff --git a/components/arcade/showcase/small-view-card.js b/components/arcade/showcase/small-view-card.js new file mode 100644 index 00000000..24876e32 --- /dev/null +++ b/components/arcade/showcase/small-view-card.js @@ -0,0 +1,33 @@ +import { useRef } from 'react' +import { Text, Close } from 'theme-ui' +import styles from './cohort-card.module.css' +import { useState } from 'react' +import { Button } from 'theme-ui' +import Icon from '@hackclub/icons' +import randomNotFoundImg from './random-not-found-img' +/** @jsxImportSource theme-ui */ + +const SmallView = ({ + id, + title = 'Title Not Found', + desc = 'Description Not Found' +}) => { + return ( +
+

{title}

+ +

{desc}

+
+ ) +} + +export default SmallView diff --git a/package.json b/package.json index 3630e059..cf6f0425 100644 --- a/package.json +++ b/package.json @@ -62,6 +62,7 @@ "pcb-stackup": "^4.2.8", "rc-dialog": "^9.5.2", "react": "^17.0.2", + "react-beautiful-dnd": "^13.1.1", "react-before-after-slider-component": "^1.1.8", "react-countdown": "^2.3.6", "react-datepicker": "^4.24.0", diff --git a/pages/arcade/showcase/vote.js b/pages/arcade/showcase/vote.js new file mode 100644 index 00000000..df6e0415 --- /dev/null +++ b/pages/arcade/showcase/vote.js @@ -0,0 +1,770 @@ +import { useEffect, useState, useRef } from 'react' +import CohortCard from '../../../components/arcade/showcase/cohort-card' +import { Button, Heading, Text, Box, Close, Flex } from 'theme-ui' +import SlideDown from '../../../components/slide-down' +import styles from '../../../components/arcade/showcase/my.module.css' +import Countdown from 'react-countdown' +import Icon from '@hackclub/icons' +import ProjectView from '../../../components/arcade/showcase/project-view' +import SmallView from '../../../components/arcade/showcase/small-view-card' +import { DragDropContext, Droppable, Draggable } from 'react-beautiful-dnd' +import { over } from 'lodash' + +/** @jsxImportSource theme-ui */ + +const styled = ` +@import url('https://fonts.googleapis.com/css2?family=Slackey&family=Emblema+One&family=Gaegu&display=swap'); +body, html { + overflow-x: hidden; + } +.slackey { + font-family: "Slackey", sans-serif; + } + .emblema { + font-family: "Emblema One", system-ui; + } + + .gaegu { + font-family: "Gaegu", sans-serif; + } + + body { + background-color: #FAEFD6; + } + +@keyframes float { + + from, + to { + transform: translate(0%, -37%) rotate(-2deg); + } + + 25% { + transform: translate(-2%, -40%) rotate(2deg); + } + + 50% { + transform: translate(0%, -43%) rotate(-1deg); + } + + 75% { + transform: translate(-1%, -40%) rotate(-1deg); + } +} + +a { + color: inherit; +} +` + +const Loading = () => ( +
+ Loading... +
+) + +const ErrorMessage = () => ( +
+ There was an error loading your project. +
+) + +const My = () => { + // let originalProjects = { + // cohort: { + // id: 'rectAjJ2Lv4dDhUGR' + // }, + // showcases: [ + // { + // id: 'rec4cl4TSvfwwnU6H', + // createdTime: '2024-08-14T13:47:49.000Z', + // fields: { + // Name: 'Blast-off', + // 'Code Link': 'https://github.com/Ranger-NF/BlastOff', + // 'Play Link': 'https://ranger-nf.itch.io/blastoff', + // Description: 'This is a description', + // color: '#14f0cb', + // textColor: '#ffffff', + // ScreenshotLink: + // 'https://cloud-c6ul4axwx-hack-club-bot.vercel.app/0instagram_profile_downloader.jpg', + // ReadMeLink: + // 'https://raw.githubusercontent.com/remarkjs/react-markdown/main/readme.md', + // 'View link': + // 'https://hackclub.com/arcade/showcase/project/rec4cl4TSvfwwnU6H' + // } + // }, + // { + // id: 'recLyu8vD4mmUqYrA', + // createdTime: '2024-08-19T17:12:16.000Z', + // fields: { + // Name: 'Turtle T1 (A rabbit R1 spinoff)', + // 'Code Link': 'https://github.com/briyandyju09/Turtle-T1', + // Description: 'A web based spin off to the not so liked rabbit R1', + // color: '#FAEFD6', + // ScreenshotLink: + // 'https://cloud-k7p388c60-hack-club-bot.vercel.app/0image-19.png', + // ReadMeLink: + // 'https://raw.githubusercontent.com/briyandyju09/Turtle-T1/main/README.md', + // 'View link': + // 'https://hackclub.com/arcade/showcase/project/recLyu8vD4mmUqYrA' + // } + // }, + // { + // id: 'recYZd9J9MS4fDuJC', + // createdTime: '2024-08-16T22:28:10.000Z', + // fields: { + // Name: 'peace-and-tranquility', + // 'Code Link': 'https://github.com/maxwofford/peace-and-tranquility', + // 'Play Link': 'https://dinosaurbbq.org/', + // Description: 'No one is around to help', + // color: '#293438', + // textColor: '#ffffff', + // ScreenshotLink: + // 'https://cloud-c6ul4axwx-hack-club-bot.vercel.app/0instagram_profile_downloader.jpg', + // ReadMeLink: + // 'https://raw.githubusercontent.com/remarkjs/react-markdown/main/readme.md', + // 'View link': + // 'https://hackclub.com/arcade/showcase/project/recYZd9J9MS4fDuJC' + // } + // }, + // { + // id: 'reclIN8evh60EH90v', + // createdTime: '2024-08-17T05:57:05.000Z', + // fields: { + // Name: 'site2eeeEEE534', + // 'Code Link': 'https://github.com/hackclub/site', + // 'Play Link': 'https://hackclub.com', + // Description: + // '🌈 The new, new Hack Club website (uses Next.js & Theme UI).', + // color: '#68d0f8', + // textColor: '#fafafa', + // ScreenshotLink: + // 'https://cloud-c6ul4axwx-hack-club-bot.vercel.app/0instagram_profile_downloader.jpg', + // ReadMeLink: + // 'https://raw.githubusercontent.com/remarkjs/react-markdown/main/readme.md', + // 'View link': + // 'https://hackclub.com/arcade/showcase/project/reclIN8evh60EH90v' + // } + // }, + // { + // id: 'reclIN8evh60EH2220v', + // createdTime: '2024-08-17T05:57:05.000Z', + // fields: { + // Name: 'site2eeeEEE53344', + // 'Code Link': 'https://github.com/hackclub/site', + // 'Play Link': 'https://hackclub.com', + // Description: + // '🌈 The new, new Hack Club website (uses Next.js & Theme UI).', + // color: '#68d0f8', + // textColor: '#fafafa', + // ScreenshotLink: + // 'https://cloud-c6ul4axwx-hack-club-bot.vercel.app/0instagram_profile_downloader.jpg', + // ReadMeLink: + // 'https://raw.githubusercontent.com/remarkjs/react-markdown/main/readme.md', + // 'View link': + // 'https://hackclub.com/arcade/showcase/project/reclIN8evh60EH90v' + // } + // } + // ] + // } + + // originalProjects = originalProjects.showcases + const [projects, setProjects] = useState([]) + const [originalProjects, setOriginalProjects] = useState([]) + const [name, setName] = useState('') + const [loadStatus, setLoadStatus] = useState('loading') + const [status, setStatus] = useState('loading') + const [errorMsg, setError] = useState(null) + const [votes, setVotes] = useState({}) + const [openProjectId, setOpenProjectId] = useState('') + const [openProject, setOpenProject] = useState([]) + const [showUIElements, setShowUIElements] = useState(false) + const [activeDroppableId, setActiveDroppableId] = useState(null) + const [activeDroppable, setActiveDroppable] = useState(true) + + const [submitStatus, setSubmitStatus] = useState('loading') + const [creative, setCreative] = useState([]) + const [technical, setTechnical] = useState([]) + const [overall, setOverall] = useState([]) + + const [showCreative, setShowCreative] = useState(true) + const [showTechnical, setShowTechnical] = useState(false) + const [showOverall, setShowOverall] = useState(false) + const [endPage, setEndPage] = useState(false) + const [isButtonActive, setIsButtonActive] = useState(false) + + const loadProjects = async () => { + const token = window.localStorage.getItem('arcade.authToken') + const response = await fetch('/api/arcade/showcase/cohort/active', { + method: 'GET', + headers: { + Authorization: `Bearer ${token}` + } + }).catch(e => { + console.error(e) + setLoadStatus('error') + setError(e) + }) + const data = await response.json() + if (data.error) { + setLoadStatus('error') + return + } else { + setProjects(data.showcases) + setOriginalProjects(data.showcases) + setLoadStatus('success') + } + } + + useEffect(async () => { + loadProjects() + }, []) + + const getProjectDetails = async () => { + const token = window.localStorage.getItem('arcade.authToken') + setStatus('loading') + + try { + const response = await fetch( + `/api/arcade/showcase/projects/${openProjectId}`, + { + method: 'GET', + headers: { + Authorization: `Bearer ${token}` + } + } + ) + + const data = await response.json() + + if (data.error) { + setStatus('error') + setError(data.error) + } else { + setOpenProject(data.project) + setStatus('success') + } + } catch (e) { + console.error(e) + setStatus('error') + setError(e.message) + } + } + + useEffect(() => { + getProjectDetails() + }, [openProjectId]) + + useEffect(() => { + setShowUIElements(true) + }, []) + + useEffect(() => { + console.log(Object.keys(votes).length) + if (Object.keys(votes).length == 5) { + setIsButtonActive(true) + } else { + setIsButtonActive(false) + } + }, [votes]) + + const extractVotes = votes => { + const sortedKeys = Object.keys(votes).sort((a, b) => { + const numA = parseInt(a.split('-')[1], 10) + const numB = parseInt(b.split('-')[1], 10) + return numA - numB + }) + + return sortedKeys.map(key => votes[key]) + } + + const onDragUpdate = update => { + setActiveDroppable(true) + const { destination } = update + if (destination) { + setActiveDroppableId(destination.droppableId) + } + } + + const onDragEnd = result => { + const { source, destination } = result + + if (!destination) return + + if ( + source.droppableId === 'projects' && + destination.droppableId.startsWith('votes-') + ) { + const linkId = result.draggableId + const voteId = destination.droppableId + + setVotes(prevVotes => { + const updatedVotes = { + ...prevVotes, + [voteId]: linkId + } + + const votedProjectIds = Object.values(updatedVotes) + + const updatedProjects = originalProjects.filter( + project => !votedProjectIds.includes(project.id) + ) + + setProjects(updatedProjects) + + return updatedVotes + }) + } + setActiveDroppable(false) + } + + const deleteVote = voteId => { + setVotes(prevVotes => { + const updatedVotes = { ...prevVotes } + + delete updatedVotes[voteId] + + const votedProjectIds = Object.values(updatedVotes) + + const updatedProjects = originalProjects.filter( + project => !votedProjectIds.includes(project.id) + ) + + setProjects(updatedProjects) + + return updatedVotes + }) + } + + const renderVoteBox = voteId => { + const linkId = votes[voteId] + const project = originalProjects.find(link => link.id === linkId) + + if (project) { + return ( +
+ { + deleteVote(voteId) + }} + /> + + + {voteId.replace('votes-', '')} + + + + + {project.fields.Name} + + + {project.fields.Description} + + +
+ ) + } + + return ( +
+ + + {voteId.replace('votes-', '')} + + + + Drop here + +
+ ) + } + + const voteCreative = () => { + let ids = extractVotes(votes) + setCreative(ids) + setShowCreative(false) + setVotes({}) + setProjects(originalProjects) + setShowTechnical(true) + } + + const voteTechnical = () => { + let ids = extractVotes(votes) + setTechnical(ids) + setShowTechnical(false) + setVotes({}) + setProjects(originalProjects) + setShowOverall(true) + } + + const voteOverall = () => { + let ids = extractVotes(votes) + setOverall(ids) + setShowTechnical(false) + setVotes({}) + setProjects(originalProjects) + setEndPage(true) + } + + const submitVote = async (creative, technical, overall) => { + const authToken = window.localStorage.getItem('arcade.authToken') + + try { + const response = await fetch('/api/arcade/showcase/vote', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + Authorization: authToken + }, + body: JSON.stringify({ + creative, + technical, + overall + }) + }) + + const data = await response.json() + setSubmitStatus('success') + return data + } catch (error) { + console.error('Error submitting vote:', error) + setSubmitStatus('error') + throw error + } + } + + useEffect(() => { + console.log('the votes') + console.log(creative) + console.log(technical) + console.log(overall) + + submitVote(creative, technical, overall) + }, [endPage]) + + return endPage == true ? ( +
+ {submitStatus == 'loading' + ? 'Loading' + : submitStatus == 'success' + ? 'Thanks for voting!' + : 'Ran into an error sending your votes'} +
+ ) : ( + showUIElements && ( +
+
+ +
+
+ + Ships + + + Here are the 18 projects for this round of voting :) Please + carefully look at each of them. + + + {provided => ( +
+ {projects.map((project, index) => ( + + {provided => ( +
{ + document + .getElementById('show-project') + .showModal() + + setOpenProjectId(project.id) + }} + sx={{ + cursor: 'drag' + }} + > + +
+ )} +
+ ))} + {provided.placeholder} +
+ )} +
+
+
+
+ + Choose top 5 for{' '} + + + {showCreative + ? 'Most creative ships' + : showTechnical + ? 'Most technical ships' + : 'Best overall ships'} + + {['votes-1', 'votes-2', 'votes-3', 'votes-4', 'votes-5'].map( + voteId => ( + + {provided => ( +
+ {renderVoteBox(voteId)} + {provided.placeholder} +
+ )} +
+ ) + )} + {isButtonActive ? ( + + ) : ( + + )} +
+
+
+
+ + + {status == 'loading' && } + + {status == 'error' && } + + {status == 'success' && ( + + )} + { + document.getElementById('show-project').close() + }} + /> + +
+ + +
+ ) + ) +} + +export default My diff --git a/yarn.lock b/yarn.lock index 4ca58994..3fc37530 100644 --- a/yarn.lock +++ b/yarn.lock @@ -992,7 +992,7 @@ dependencies: regenerator-runtime "^0.13.4" -"@babel/runtime@^7.10.1", "@babel/runtime@^7.11.1", "@babel/runtime@^7.12.5", "@babel/runtime@^7.18.0", "@babel/runtime@^7.18.3", "@babel/runtime@^7.21.0", "@babel/runtime@^7.5.5", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7": +"@babel/runtime@^7.10.1", "@babel/runtime@^7.11.1", "@babel/runtime@^7.12.5", "@babel/runtime@^7.15.4", "@babel/runtime@^7.18.0", "@babel/runtime@^7.18.3", "@babel/runtime@^7.21.0", "@babel/runtime@^7.5.5", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7", "@babel/runtime@^7.9.2": version "7.25.0" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.25.0.tgz#3af9a91c1b739c569d5d80cc917280919c544ecb" integrity sha512-7dRy4DwXwtzBrPbZflqxnvfxLF8kdZXPkhymtDeFoFqE6ldzjQFgYTtYIFARcLEYDrqfBfYcZt1WqFxRoyC9Rw== @@ -2130,6 +2130,14 @@ dependencies: "@types/unist" "*" +"@types/hoist-non-react-statics@^3.3.0": + version "3.3.5" + resolved "https://registry.yarnpkg.com/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.5.tgz#dab7867ef789d87e2b4b0003c9d65c49cc44a494" + integrity sha512-SbcrWzkKBw2cdwRTwQAswfpB9g9LJWfjtUeW/jvNwbhC8cpmmNYVePa+ncbUe0rGTQ7G3Ff6mYUN2VMfLVr+Sg== + dependencies: + "@types/react" "*" + hoist-non-react-statics "^3.3.0" + "@types/json5@^0.0.29": version "0.0.29" resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" @@ -2208,11 +2216,29 @@ resolved "https://registry.yarnpkg.com/@types/parse5/-/parse5-6.0.3.tgz#705bb349e789efa06f43f128cef51240753424cb" integrity sha512-SuT16Q1K51EAVPz1K29DJ/sXjhSQ0zjvsypYJ6tlwVsRV9jwW5Adq2ch8Dq8kDBCkYnELS7N7VNCSB5nC56t/g== -"@types/prop-types@^15.0.0": +"@types/prop-types@*", "@types/prop-types@^15.0.0": version "15.7.12" resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.12.tgz#12bb1e2be27293c1406acb6af1c3f3a1481d98c6" integrity sha512-5zvhXYtRNRluoE/jAp4GVsSduVUzNWKkOZrCDBWYtE7biZywwdC2AcEzg+cSMLFRfVgeAFqpfNabiPjxFddV1Q== +"@types/react-redux@^7.1.20": + version "7.1.33" + resolved "https://registry.yarnpkg.com/@types/react-redux/-/react-redux-7.1.33.tgz#53c5564f03f1ded90904e3c90f77e4bd4dc20b15" + integrity sha512-NF8m5AjWCkert+fosDsN3hAlHzpjSiXlVy9EgQEmLoBhaNXbmyeGs/aj5dQzKuF+/q+S7JQagorGDW8pJ28Hmg== + dependencies: + "@types/hoist-non-react-statics" "^3.3.0" + "@types/react" "*" + hoist-non-react-statics "^3.3.0" + redux "^4.0.0" + +"@types/react@*": + version "18.3.4" + resolved "https://registry.yarnpkg.com/@types/react/-/react-18.3.4.tgz#dfdd534a1d081307144c00e325c06e00312c93a3" + integrity sha512-J7W30FTdfCxDDjmfRM+/JqLHBIyl7xUIp9kwK637FGmY7+mkSFSe6L4jpZzhj5QMfLssSDP4/i75AKkrdC7/Jw== + dependencies: + "@types/prop-types" "*" + csstype "^3.0.2" + "@types/styled-system@^5.1.13": version "5.1.22" resolved "https://registry.yarnpkg.com/@types/styled-system/-/styled-system-5.1.22.tgz#508499f4c68bb86dde3454693e92f5771edf177f" @@ -3303,6 +3329,13 @@ crypto-browserify@3.12.0, crypto-browserify@^3.11.0: randombytes "^2.0.0" randomfill "^1.0.3" +css-box-model@^1.2.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/css-box-model/-/css-box-model-1.2.1.tgz#59951d3b81fd6b2074a62d49444415b0d2b4d7c1" + integrity sha512-a7Vr4Q/kd/aw96bnJG332W9V9LkJO69JRcaCYDUqjp6/z0w6VcZjgAcTbgFxEPfBgdnAwlh3iwu+hLopa+flJw== + dependencies: + tiny-invariant "^1.0.6" + css-color-keywords@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/css-color-keywords/-/css-color-keywords-1.0.0.tgz#fea2616dc676b2962686b3af8dbdbe180b244e05" @@ -4961,7 +4994,7 @@ hmac-drbg@^1.0.1: minimalistic-assert "^1.0.0" minimalistic-crypto-utils "^1.0.1" -hoist-non-react-statics@^3.3.1, hoist-non-react-statics@^3.3.2: +hoist-non-react-statics@^3.3.0, hoist-non-react-statics@^3.3.1, hoist-non-react-statics@^3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45" integrity sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw== @@ -6040,6 +6073,11 @@ mdurl@^1.0.0: resolved "https://registry.yarnpkg.com/mdurl/-/mdurl-1.0.1.tgz#fe85b2ec75a59037f2adfec100fd6c601761152e" integrity sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g== +memoize-one@^5.1.1: + version "5.2.1" + resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-5.2.1.tgz#8337aa3c4335581839ec01c3d594090cebe8f00e" + integrity sha512-zYiwtZUcYyXKo/np96AGZAckk+FWWsUdJ3cHGGmld7+AhvcWmQyGCYUh1hc4Q/pkOhb65dQR/pqCyK0cOaHz4Q== + merge-stream@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" @@ -7363,6 +7401,11 @@ quick-lru@^1.0.0: resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-1.1.0.tgz#4360b17c61136ad38078397ff11416e186dcfbb8" integrity sha512-tRS7sTgyxMXtLum8L65daJnHUhfDUgboRdcWW2bR9vBfrj2+O5HSMbQOJfJJjIVSPFqbBCF37FpwWXGitDc5tA== +raf-schd@^4.0.2: + version "4.0.3" + resolved "https://registry.yarnpkg.com/raf-schd/-/raf-schd-4.0.3.tgz#5d6c34ef46f8b2a0e880a8fcdb743efc5bfdbc1a" + integrity sha512-tQkJl2GRWh83ui2DiPTJz9wEiMN20syf+5oKfB03yYP7ioZcJwsIK8FjrtLwH1m7C7e+Tt2yYBlrOpdT+dyeIQ== + randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5: version "2.1.0" resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" @@ -7416,6 +7459,19 @@ rc-util@^5.21.0, rc-util@^5.24.4, rc-util@^5.43.0: "@babel/runtime" "^7.18.3" react-is "^18.2.0" +react-beautiful-dnd@^13.1.1: + version "13.1.1" + resolved "https://registry.yarnpkg.com/react-beautiful-dnd/-/react-beautiful-dnd-13.1.1.tgz#b0f3087a5840920abf8bb2325f1ffa46d8c4d0a2" + integrity sha512-0Lvs4tq2VcrEjEgDXHjT98r+63drkKEgqyxdA7qD3mvKwga6a5SscbdLPO2IExotU1jW8L0Ksdl0Cj2AF67nPQ== + dependencies: + "@babel/runtime" "^7.9.2" + css-box-model "^1.2.0" + memoize-one "^5.1.1" + raf-schd "^4.0.2" + react-redux "^7.2.0" + redux "^4.0.4" + use-memo-one "^1.1.1" + react-before-after-slider-component@^1.1.8: version "1.1.8" resolved "https://registry.yarnpkg.com/react-before-after-slider-component/-/react-before-after-slider-component-1.1.8.tgz#3df14381703aaa43428cdac05f271b8b492d25ca" @@ -7466,6 +7522,11 @@ react-is@16.13.1, react-is@^16.10.2, react-is@^16.13.1, react-is@^16.7.0, react- resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4" integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== +react-is@^17.0.2: + version "17.0.2" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0" + integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w== + react-is@^18.0.0, react-is@^18.2.0: version "18.3.1" resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.3.1.tgz#e83557dc12eae63a99e003a46388b1dcbb44db7e" @@ -7534,6 +7595,18 @@ react-popper@^2.3.0: react-fast-compare "^3.0.1" warning "^4.0.2" +react-redux@^7.2.0: + version "7.2.9" + resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-7.2.9.tgz#09488fbb9416a4efe3735b7235055442b042481d" + integrity sha512-Gx4L3uM182jEEayZfRbI/G11ZpYdNAnBs70lFVMNdHJI76XYtR+7m0MN+eAs7UHBPhWXcnFPaS+9owSCJQHNpQ== + dependencies: + "@babel/runtime" "^7.15.4" + "@types/react-redux" "^7.1.20" + hoist-non-react-statics "^3.3.2" + loose-envify "^1.4.0" + prop-types "^15.7.2" + react-is "^17.0.2" + react-refresh@0.8.3: version "0.8.3" resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.8.3.tgz#721d4657672d400c5e3c75d063c4a85fb2d5d68f" @@ -7706,6 +7779,13 @@ recharts@2.12.2: tiny-invariant "^1.3.1" victory-vendor "^36.6.8" +redux@^4.0.0, redux@^4.0.4: + version "4.2.1" + resolved "https://registry.yarnpkg.com/redux/-/redux-4.2.1.tgz#c08f4306826c49b5e9dc901dee0452ea8fce6197" + integrity sha512-LAUYz4lc+Do8/g7aeRa8JkyDErK6ekstQaqWQrNRW//MY1TvCEpMtpTWvlQ+FPbWCx+Xixu/6SHt5N0HR+SB4w== + dependencies: + "@babel/runtime" "^7.9.2" + reflect.getprototypeof@^1.0.4: version "1.0.6" resolved "https://registry.yarnpkg.com/reflect.getprototypeof/-/reflect.getprototypeof-1.0.6.tgz#3ab04c32a8390b770712b7a8633972702d278859" @@ -8394,16 +8474,7 @@ string-hash@1.1.3: resolved "https://registry.yarnpkg.com/string-hash/-/string-hash-1.1.3.tgz#e8aafc0ac1855b4666929ed7dd1275df5d6c811b" integrity sha512-kJUvRUFK49aub+a7T1nNE66EJbZBMnBgoC1UbCZ5n6bsZKBRga4KgBRTMn/pFkeCZSYtNeSyMxPDM0AXWELk2A== -"string-width-cjs@npm:string-width@^4.2.0": - version "4.2.3" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" - -string-width@^4.1.0: +"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -8514,7 +8585,7 @@ stringify-entities@^4.0.0: character-entities-html4 "^2.0.0" character-entities-legacy "^3.0.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1": +"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -8528,13 +8599,6 @@ strip-ansi@6.0.0: dependencies: ansi-regex "^5.0.0" -strip-ansi@^6.0.0, strip-ansi@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" - strip-ansi@^7.0.1: version "7.1.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45" @@ -8714,7 +8778,7 @@ timers-browserify@2.0.12, timers-browserify@^2.0.4: dependencies: setimmediate "^1.0.4" -tiny-invariant@^1.3.1: +tiny-invariant@^1.0.6, tiny-invariant@^1.3.1: version "1.3.3" resolved "https://registry.yarnpkg.com/tiny-invariant/-/tiny-invariant-1.3.3.tgz#46680b7a873a0d5d10005995eb90a70d74d60127" integrity sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg== @@ -9214,6 +9278,11 @@ url@^0.11.0: punycode "^1.4.1" qs "^6.12.3" +use-memo-one@^1.1.1: + version "1.1.3" + resolved "https://registry.yarnpkg.com/use-memo-one/-/use-memo-one-1.1.3.tgz#2fd2e43a2169eabc7496960ace8c79efef975e99" + integrity sha512-g66/K7ZQGYrI6dy8GLpVcMsBp4s17xNkYJVSMvTEevGy3nDxHOfE6z8BVE22+5G5x7t3+bhzrlTDB7ObrEE0cQ== + use-subscription@1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/use-subscription/-/use-subscription-1.5.1.tgz#73501107f02fad84c6dd57965beb0b75c68c42d1"