Skip to content

Commit

Permalink
add ArchivalNoticeModal
Browse files Browse the repository at this point in the history
  • Loading branch information
aayushkh committed Dec 28, 2023
1 parent cf10d07 commit 18c22f5
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 60 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/firebase-hosting-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/firebase-hosting-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}'
Expand Down
73 changes: 25 additions & 48 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 3 additions & 0 deletions src/Components/Home/Home.jsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -28,6 +30,7 @@ export default function Home({ setToken }) {
closeFunction={() => setModalIsOpen(false)}
/>
</section>
<ArchivalNoticeModal />
</div>
);
}
17 changes: 9 additions & 8 deletions src/Components/NewTokenButton.jsx
Original file line number Diff line number Diff line change
@@ -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 (
Expand Down

0 comments on commit 18c22f5

Please sign in to comment.