From 18c22f5687de284dd10479bb4a025b37c956aa14 Mon Sep 17 00:00:00 2001 From: "aayush@nexleaf.org" Date: Thu, 28 Dec 2023 12:38:27 -0800 Subject: [PATCH] add ArchivalNoticeModal --- .github/workflows/firebase-hosting-merge.yml | 2 +- .../firebase-hosting-pull-request.yml | 2 +- package-lock.json | 73 +++++++------------ package.json | 5 +- src/Components/Home/Home.jsx | 3 + src/Components/NewTokenButton.jsx | 17 +++-- 6 files changed, 42 insertions(+), 60 deletions(-) diff --git a/.github/workflows/firebase-hosting-merge.yml b/.github/workflows/firebase-hosting-merge.yml index 5f3aac3..0453224 100644 --- a/.github/workflows/firebase-hosting-merge.yml +++ b/.github/workflows/firebase-hosting-merge.yml @@ -14,7 +14,7 @@ jobs: - uses: actions/setup-node@v3 with: node-version-file: '.nvmrc' - - run: npm ci && npm run build + - run: npm ci --legacy-peer-deps && npm run build - uses: FirebaseExtended/action-hosting-deploy@v0 with: repoToken: '${{ secrets.GITHUB_TOKEN }}' diff --git a/.github/workflows/firebase-hosting-pull-request.yml b/.github/workflows/firebase-hosting-pull-request.yml index adb57e6..db474f5 100644 --- a/.github/workflows/firebase-hosting-pull-request.yml +++ b/.github/workflows/firebase-hosting-pull-request.yml @@ -12,7 +12,7 @@ jobs: - uses: actions/setup-node@v3 with: node-version-file: '.nvmrc' - - run: npm ci && npm run build + - run: npm ci --legacy-peer-deps && npm run build - uses: FirebaseExtended/action-hosting-deploy@v0 with: repoToken: '${{ secrets.GITHUB_TOKEN }}' diff --git a/package-lock.json b/package-lock.json index a59f055..53c95ae 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,13 +9,14 @@ "version": "0.1.0", "dependencies": { "@testing-library/react": "^11.0.4", + "@the-collab-lab/shopping-list-utils": "^2.2.0", "dayjs": "^1.9.4", "firebase": "^7.22.1", "husky": "^4.2.5", "lint-staged": "^10.2.11", "prettier": "^2.0.5", - "react": "^16.13.1", - "react-dom": "^16.13.1", + "react": "^18.2.0", + "react-dom": "^18.2.0", "react-firestore": "^1.0.1", "react-hook-form": "^6.9.2", "react-modal": "^3.11.2", @@ -4513,6 +4514,15 @@ "react-dom": "*" } }, + "node_modules/@the-collab-lab/shopping-list-utils": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@the-collab-lab/shopping-list-utils/-/shopping-list-utils-2.2.0.tgz", + "integrity": "sha512-nEN1z/SEOIWO+8JWIgPDNUkrXmXqNomSh5aiZDNdiaUH/JYqyNeXmEOldtMqAfLicSRiFkapcAIlrUUnPzNaog==", + "peerDependencies": { + "react": "^18.2.0", + "react-dom": "^18.2.0" + } + }, "node_modules/@tootallnate/once": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", @@ -17635,13 +17645,11 @@ } }, "node_modules/react": { - "version": "16.14.0", - "resolved": "https://registry.npmjs.org/react/-/react-16.14.0.tgz", - "integrity": "sha512-0X2CImDkJGApiAlcf0ODKIneSwBPhqJawOa5wCtKbu7ZECrmS26NvtSILynQ66cgkT/RJ4LidJOc3bUESwmU8g==", + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", + "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==", "dependencies": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1", - "prop-types": "^15.6.2" + "loose-envify": "^1.1.0" }, "engines": { "node": ">=0.10.0" @@ -17803,17 +17811,15 @@ } }, "node_modules/react-dom": { - "version": "16.14.0", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.14.0.tgz", - "integrity": "sha512-1gCeQXDLoIqMgqD3IO2Ah9bnf0w9kzhwN5q4FGnHZ67hBm9yePzB5JJAIQCc8x3pFnNlwFq4RidZggNAAkzWWw==", + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz", + "integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==", "dependencies": { "loose-envify": "^1.1.0", - "object-assign": "^4.1.1", - "prop-types": "^15.6.2", - "scheduler": "^0.19.1" + "scheduler": "^0.23.0" }, "peerDependencies": { - "react": "^16.14.0" + "react": "^18.2.0" } }, "node_modules/react-error-overlay": { @@ -18676,12 +18682,11 @@ } }, "node_modules/scheduler": { - "version": "0.19.1", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.19.1.tgz", - "integrity": "sha512-n/zwRWRYSUj0/3g/otKDRPMh6qv2SYMWNq85IEa8iZyAv8od9zDYpGSnpBEjNgcMNq6Scbu5KfIPxNF72R/2EA==", + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz", + "integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==", "dependencies": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1" + "loose-envify": "^1.1.0" } }, "node_modules/schema-utils": { @@ -20161,20 +20166,6 @@ "node": ">=4" } }, - "node_modules/type-fest": { - "version": "4.8.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.8.2.tgz", - "integrity": "sha512-mcvrCjixA5166hSrUoJgGb9gBQN4loMYyj9zxuMs/66ibHNEFd5JXMw37YVDx58L4/QID9jIzdTBB4mDwDJ6KQ==", - "dev": true, - "optional": true, - "peer": true, - "engines": { - "node": ">=16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/type-is": { "version": "1.6.18", "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", @@ -20268,20 +20259,6 @@ "is-typedarray": "^1.0.0" } }, - "node_modules/typescript": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", - "dev": true, - "peer": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, "node_modules/unbox-primitive": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", diff --git a/package.json b/package.json index 9b134f2..840e3d0 100644 --- a/package.json +++ b/package.json @@ -3,14 +3,15 @@ "version": "0.1.0", "private": true, "dependencies": { + "@the-collab-lab/shopping-list-utils": "^2.2.0", "@testing-library/react": "^11.0.4", "dayjs": "^1.9.4", "firebase": "^7.22.1", "husky": "^4.2.5", "lint-staged": "^10.2.11", "prettier": "^2.0.5", - "react": "^16.13.1", - "react-dom": "^16.13.1", + "react": "^18.2.0", + "react-dom": "^18.2.0", "react-firestore": "^1.0.1", "react-hook-form": "^6.9.2", "react-modal": "^3.11.2", diff --git a/src/Components/Home/Home.jsx b/src/Components/Home/Home.jsx index b7607e5..9136562 100644 --- a/src/Components/Home/Home.jsx +++ b/src/Components/Home/Home.jsx @@ -1,4 +1,6 @@ import React, { useState } from 'react'; +import { ArchivalNoticeModal } from '@the-collab-lab/shopping-list-utils'; + import NewTokenButton from '../NewTokenButton'; import JoinExistingList from '../JoinExistingList'; import CustomModal from '../CustomModal'; @@ -28,6 +30,7 @@ export default function Home({ setToken }) { closeFunction={() => setModalIsOpen(false)} /> + ); } diff --git a/src/Components/NewTokenButton.jsx b/src/Components/NewTokenButton.jsx index ccdf071..609b135 100644 --- a/src/Components/NewTokenButton.jsx +++ b/src/Components/NewTokenButton.jsx @@ -1,17 +1,18 @@ import React from 'react'; -import { generateListToken, getListToken } from '../lib/tokens'; +// import { generateListToken, getListToken } from '../lib/tokens'; import { useHistory } from 'react-router-dom'; -import { createList } from '../services/listService'; +// import { createList } from '../services/listService'; export default function Button({ setToken }) { - let history = useHistory(); + // let history = useHistory(); const handleClick = () => { - generateListToken(); - const token = getListToken(); - setToken(token); - createList(token); - history.push('/list'); + console.log('Creating new lists is disabled'); + // generateListToken(); + // const token = getListToken(); + // setToken(token); + // createList(token); + // history.push('/list'); }; return (