mirror of
https://github.com/BradNut/weddingsite
synced 2025-09-08 17:40:36 +00:00
fix: 🐛 Fixing RSVP success and update packages
This commit is contained in:
parent
a6ebcbf371
commit
4b03914b29
4 changed files with 1517 additions and 1781 deletions
3264
package-lock.json
generated
3264
package-lock.json
generated
File diff suppressed because it is too large
Load diff
28
package.json
28
package.json
|
|
@ -10,7 +10,7 @@
|
|||
"test": "NODE_ENV=test jest --watch"
|
||||
},
|
||||
"dependencies": {
|
||||
"@plaiceholder/next": "^2.3.0",
|
||||
"@plaiceholder/next": "^2.4.0",
|
||||
"@reach/dialog": "^0.17.0",
|
||||
"@reach/portal": "^0.17.0",
|
||||
"@reach/visually-hidden": "^0.17.0",
|
||||
|
|
@ -24,42 +24,42 @@
|
|||
"iron-session": "^6.1.3",
|
||||
"jsonwebtoken": "^8.5.1",
|
||||
"mongodb": "^4.7.0",
|
||||
"mongoose": "^6.3.8",
|
||||
"next": "^12.1.6",
|
||||
"mongoose": "^6.4.3",
|
||||
"next": "^12.2.0",
|
||||
"next-with-apollo": "^5.3.0",
|
||||
"normalize.css": "^8.0.1",
|
||||
"nprogress": "^0.2.0",
|
||||
"plaiceholder": "^2.3.0",
|
||||
"plaiceholder": "^2.4.0",
|
||||
"prop-types": "^15.8.1",
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2",
|
||||
"react-icons": "^4.4.0",
|
||||
"sharp": "^0.30.6",
|
||||
"sharp": "^0.30.7",
|
||||
"styled-components": "^5.3.5",
|
||||
"swr": "^1.0.1",
|
||||
"waait": "^1.0.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.18.5",
|
||||
"@babel/preset-env": "^7.18.2",
|
||||
"@babel/core": "^7.18.6",
|
||||
"@babel/preset-env": "^7.18.6",
|
||||
"@testing-library/jest-dom": "^5.16.4",
|
||||
"@testing-library/react": "^12.1.4",
|
||||
"@testing-library/user-event": "^13.5.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.28.0",
|
||||
"@typescript-eslint/parser": "^5.28.0",
|
||||
"eslint": "^8.17.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.30.5",
|
||||
"@typescript-eslint/parser": "^5.30.5",
|
||||
"eslint": "^8.19.0",
|
||||
"eslint-config-airbnb": "^19.0.4",
|
||||
"eslint-config-prettier": "^8.5.0",
|
||||
"eslint-config-wesbos": "^3.0.2",
|
||||
"eslint-plugin-html": "^6.2.0",
|
||||
"eslint-plugin-import": "^2.26.0",
|
||||
"eslint-plugin-jsx-a11y": "^6.5.1",
|
||||
"eslint-plugin-prettier": "^4.0.0",
|
||||
"eslint-plugin-react": "^7.30.0",
|
||||
"eslint-plugin-jsx-a11y": "^6.6.0",
|
||||
"eslint-plugin-prettier": "^4.2.1",
|
||||
"eslint-plugin-react": "^7.30.1",
|
||||
"eslint-plugin-react-hooks": "^4.6.0",
|
||||
"jest": "^27.5.1",
|
||||
"prettier": "^2.7.1",
|
||||
"typescript": "^4.7.3"
|
||||
"typescript": "^4.7.4"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": [
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ export default withSession(async (req, res) => {
|
|||
// TODO: REMOVE THIS WHEN TAKING YOUR SITE TO PRODUCTION
|
||||
if (process.env.SITE_ENV === 'TEST_SITE') {
|
||||
console.log('DONE!');
|
||||
res.status(200).json(JSON.stringify({ message: 'SUCCESS' }));
|
||||
res.status(200).json({ message: 'SUCCESS' });
|
||||
} else {
|
||||
const { groupId, guests, note } = body;
|
||||
for (const guest of guests) {
|
||||
|
|
@ -85,7 +85,7 @@ export default withSession(async (req, res) => {
|
|||
await Group.findByIdAndUpdate(groupId, {
|
||||
note: escape(note),
|
||||
});
|
||||
res.status(200).json(JSON.stringify({ message: 'SUCCESS' }));
|
||||
res.status(200).json({ message: 'SUCCESS' });
|
||||
}
|
||||
} catch (error) {
|
||||
const { response: fetchResponse } = error;
|
||||
|
|
|
|||
|
|
@ -208,6 +208,8 @@ export default function SingleGroupPage({ group }) {
|
|||
body: JSON.stringify(body),
|
||||
});
|
||||
|
||||
console.log('res.message', res.message);
|
||||
|
||||
if (res.message === 'SUCCESS') {
|
||||
setMessage(
|
||||
`Successfully submitted your RSVP${
|
||||
|
|
|
|||
Loading…
Reference in a new issue