Modify site to meet Grace's requirements.

This commit is contained in:
Ray 2023-12-04 11:28:00 +00:00 committed by GitHub
parent 79c20c57af
commit 664c5efd7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
42 changed files with 149 additions and 513 deletions

View File

@ -1,12 +1,12 @@
asset-manifest.json,1700409864132,5731e28c4cbfcefd9a669b8f76d1439e37f75c9cebf0bb4d5eee2a62e24d3ad7 asset-manifest.json,1701689001273,d63807b686cde494acefdc4a7f66adb30289726729387faca740a259955aa096
index.html,1700409864132,25dc54bd8355af59108b4c5284a459af9fcbec6c737310322f359710a55ec47b logo192.png,1701688984397,c621f7ba0965ce7fc3f1a429c12a4a1d9cae19877ce3b8cebee93845deab0617
logo192.png,1700409842268,6bc47cf0894cf9649df5e711b94dc4d597f21d3b379f4c4bb0e3f922e51a5410 index.html,1701689001273,daf02593ee90bdb64a7d2a629b2b3ba4b375afd6d6fcb8eb6e4791540b8d10d6
manifest.json,1700409842276,0958a5e0c831126100c8c2d06a6bbaa665a3900f21aaff4130238a6f5a113aa1 manifest.json,1701688984397,0958a5e0c831126100c8c2d06a6bbaa665a3900f21aaff4130238a6f5a113aa1
robots.txt,1700409842280,2544ca049f223a42bff01f72ad930a5edba75bbb7199d0f8430a02ff5aca16ec robots.txt,1701688984397,2544ca049f223a42bff01f72ad930a5edba75bbb7199d0f8430a02ff5aca16ec
static/js/787.fe1675bb.chunk.js,1700409864160,09044c094544c6017476721265373bd92ca82ed8434b6f9c010fe07087e14d49 static/js/787.fe1675bb.chunk.js,1701689001297,09044c094544c6017476721265373bd92ca82ed8434b6f9c010fe07087e14d49
static/js/787.fe1675bb.chunk.js.map,1700409864168,683229073c7ef9ee1a721578162763c4560a3420f836b325c01601e50f646529 static/js/787.fe1675bb.chunk.js.map,1701689001301,683229073c7ef9ee1a721578162763c4560a3420f836b325c01601e50f646529
static/js/main.1f826c52.js.LICENSE.txt,1700409864156,c8bddbf75def1f05e0571ef84d5053e7a4d4156dfae8ebc4a275dab4d285a1ec static/js/main.db77c455.js.LICENSE.txt,1701689001293,025207c5e9934797fea1918a1560a8d2747ae5dd12179436ec22ee8c84341806
static/css/main.6ccd65a8.css,1700409864156,265f9979f4391283252fdae35b22ffd098a887c8d5f299ccf72fa2f4335c8303 static/css/main.6ccd65a8.css,1701689001293,265f9979f4391283252fdae35b22ffd098a887c8d5f299ccf72fa2f4335c8303
static/css/main.6ccd65a8.css.map,1700409864160,6d6f3434075d5f325c92f6ab942391103fcbf237317eb7d825dd42e97c416961 static/css/main.6ccd65a8.css.map,1701689001297,6d6f3434075d5f325c92f6ab942391103fcbf237317eb7d825dd42e97c416961
static/js/main.1f826c52.js,1700409864160,fa96aa57f881895a735ffbb5a07eccc5fe3c8a59192388de31b9f41b32700e43 static/js/main.db77c455.js,1701689001297,607a62798805c9f0e2722520a5e953c972f056aa9e9c1927862df4624ab283ae
static/js/main.1f826c52.js.map,1700409864160,325830cbee90f9cfc3844f3c9dc2e93aac07bf1f10993664a6ddbe7b5022ba90 static/js/main.db77c455.js.map,1701689001297,9c54119ec5a1a4f6b2f1db5aef3b244bcddf8ef5783b0b9ea1f65037d5ec625d

View File

@ -1,5 +1,5 @@
{ {
"projects": { "projects": {
"default": "rayyan-h-tafe-nsw" "default": "systie"
} }
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 128 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 175 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 298 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 214 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

View File

@ -2,21 +2,8 @@ rules_version = '2';
service cloud.firestore { service cloud.firestore {
match /databases/{database}/documents { match /databases/{database}/documents {
match /{document=**} {
// This rule allows anyone with your Firestore database reference to view, edit, allow read, write: if false;
// and delete all data in your Firestore database. It is useful for getting
// started, but it is configured to expire after 30 days because it
// leaves your app open to attackers. At that time, all client
// requests to your Firestore database will be denied.
//
// Make sure to write security rules for your app before that time, or else
// all client requests to your Firestore database will be denied until you Update
// your rules
//match /{document=**} {
//allow read, write: if request.time < timestamp.date(2023, 9, 28);
// }
match /books/{document=**} {
allow read: if true;
} }
} }
} }

190
package-lock.json generated
View File

@ -13,7 +13,7 @@
"@testing-library/user-event": "^13.5.0", "@testing-library/user-event": "^13.5.0",
"bootstrap": "^5.3.2", "bootstrap": "^5.3.2",
"create-react-app": "^5.0.1", "create-react-app": "^5.0.1",
"firebase": "^10.4.0", "firebase": "^10.7.0",
"firebase-tools": "^0.1.6", "firebase-tools": "^0.1.6",
"react": "^18.2.0", "react": "^18.2.0",
"react-bootstrap": "^2.8.0", "react-bootstrap": "^2.8.0",
@ -2492,6 +2492,14 @@
"node": "^12.22.0 || ^14.17.0 || >=16.0.0" "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
} }
}, },
"node_modules/@fastify/busboy": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.0.tgz",
"integrity": "sha512-+KpH+QxZU7O4675t3mnkQKcZZg56u+K/Ct2K+N2AZYNVK8kyeo/bI18tI8aPm3tvNNRyTWfj6s5tnGNlcbQRsA==",
"engines": {
"node": ">=14"
}
},
"node_modules/@firebase/analytics": { "node_modules/@firebase/analytics": {
"version": "0.10.0", "version": "0.10.0",
"resolved": "https://registry.npmjs.org/@firebase/analytics/-/analytics-0.10.0.tgz", "resolved": "https://registry.npmjs.org/@firebase/analytics/-/analytics-0.10.0.tgz",
@ -2528,9 +2536,9 @@
"integrity": "sha512-iRP+QKI2+oz3UAh4nPEq14CsEjrjD6a5+fuypjScisAh9kXKFvdJOZJDwk7kikLvWVLGEs9+kIUS4LPQV7VZVw==" "integrity": "sha512-iRP+QKI2+oz3UAh4nPEq14CsEjrjD6a5+fuypjScisAh9kXKFvdJOZJDwk7kikLvWVLGEs9+kIUS4LPQV7VZVw=="
}, },
"node_modules/@firebase/app": { "node_modules/@firebase/app": {
"version": "0.9.19", "version": "0.9.24",
"resolved": "https://registry.npmjs.org/@firebase/app/-/app-0.9.19.tgz", "resolved": "https://registry.npmjs.org/@firebase/app/-/app-0.9.24.tgz",
"integrity": "sha512-t/SHyZ3xWkR77ZU9VMoobDNFLdDKQ5xqoCAn4o16gTsA1C8sJ6ZOMZ02neMOPxNHuQXVE4tA8ukilnDbnK7uJA==", "integrity": "sha512-hka/F1zNZ1mNE1cEj0uP6WNltuTZNldHkyqNLYCvfkXT4Ly+pChuUheRl0qccDWFLws9HyVXCNTtlfMmR+iq4w==",
"dependencies": { "dependencies": {
"@firebase/component": "0.6.4", "@firebase/component": "0.6.4",
"@firebase/logger": "0.4.0", "@firebase/logger": "0.4.0",
@ -2580,11 +2588,11 @@
"integrity": "sha512-uwSUj32Mlubybw7tedRzR24RP8M8JUVR3NPiMk3/Z4bCmgEKTlQBwMXrehDAZ2wF+TsBq0SN1c6ema71U/JPyQ==" "integrity": "sha512-uwSUj32Mlubybw7tedRzR24RP8M8JUVR3NPiMk3/Z4bCmgEKTlQBwMXrehDAZ2wF+TsBq0SN1c6ema71U/JPyQ=="
}, },
"node_modules/@firebase/app-compat": { "node_modules/@firebase/app-compat": {
"version": "0.2.19", "version": "0.2.24",
"resolved": "https://registry.npmjs.org/@firebase/app-compat/-/app-compat-0.2.19.tgz", "resolved": "https://registry.npmjs.org/@firebase/app-compat/-/app-compat-0.2.24.tgz",
"integrity": "sha512-QkJDqYqjhvs4fTMcRVXQkP9hbo5yfoJXDWkhU4VA5Vzs8Qsp76VPzYbqx5SD5OmBy+bz/Ot1UV8qySPGI4aKuw==", "integrity": "sha512-+l+vvxXGfPtb1oRQaqbNJWq/QWuC2n2njI/XLNMu2lu5sSLbdDOXHzidr6fbaLOOpESo4Gnagimp5dSnGQnaVg==",
"dependencies": { "dependencies": {
"@firebase/app": "0.9.19", "@firebase/app": "0.9.24",
"@firebase/component": "0.6.4", "@firebase/component": "0.6.4",
"@firebase/logger": "0.4.0", "@firebase/logger": "0.4.0",
"@firebase/util": "1.9.3", "@firebase/util": "1.9.3",
@ -2597,15 +2605,15 @@
"integrity": "sha512-AeweANOIo0Mb8GiYm3xhTEBVCmPwTYAu9Hcd2qSkLuga/6+j9b1Jskl5bpiSQWy9eJ/j5pavxj6eYogmnuzm+Q==" "integrity": "sha512-AeweANOIo0Mb8GiYm3xhTEBVCmPwTYAu9Hcd2qSkLuga/6+j9b1Jskl5bpiSQWy9eJ/j5pavxj6eYogmnuzm+Q=="
}, },
"node_modules/@firebase/auth": { "node_modules/@firebase/auth": {
"version": "1.3.0", "version": "1.5.0",
"resolved": "https://registry.npmjs.org/@firebase/auth/-/auth-1.3.0.tgz", "resolved": "https://registry.npmjs.org/@firebase/auth/-/auth-1.5.0.tgz",
"integrity": "sha512-vjK4CHbY9aWdiVOrKi6mpa8z6uxeaf7LB/MZTHuZOiGHMcUoTGB6TeMbRShyqk1uaMrxhhZ5Ar/dR0965E1qyA==", "integrity": "sha512-GWkG0j/vy7MVK8qN5DLToJ/UdaP7cjJ2ksHeb8oqWZe5KoJJVqz2+Wg2fqH/hLRIXarj6KQH0ZvEOXGvFXFHmA==",
"dependencies": { "dependencies": {
"@firebase/component": "0.6.4", "@firebase/component": "0.6.4",
"@firebase/logger": "0.4.0", "@firebase/logger": "0.4.0",
"@firebase/util": "1.9.3", "@firebase/util": "1.9.3",
"node-fetch": "2.6.7", "tslib": "^2.1.0",
"tslib": "^2.1.0" "undici": "5.26.5"
}, },
"peerDependencies": { "peerDependencies": {
"@firebase/app": "0.x", "@firebase/app": "0.x",
@ -2618,16 +2626,16 @@
} }
}, },
"node_modules/@firebase/auth-compat": { "node_modules/@firebase/auth-compat": {
"version": "0.4.6", "version": "0.5.0",
"resolved": "https://registry.npmjs.org/@firebase/auth-compat/-/auth-compat-0.4.6.tgz", "resolved": "https://registry.npmjs.org/@firebase/auth-compat/-/auth-compat-0.5.0.tgz",
"integrity": "sha512-pKp1d4fSf+yoy1EBjTx9ISxlunqhW0vTICk0ByZ3e+Lp6ZIXThfUy4F1hAJlEafD/arM0oepRiAh7LXS1xn/BA==", "integrity": "sha512-jinbExdXRIDHEcNRQiQbz3qykWl7mvIXKNNLbbBqv04LWrsflhDgX54axfy3RIrZhiD8nD1btwSzJrZkt8jL8A==",
"dependencies": { "dependencies": {
"@firebase/auth": "1.3.0", "@firebase/auth": "1.5.0",
"@firebase/auth-types": "0.12.0", "@firebase/auth-types": "0.12.0",
"@firebase/component": "0.6.4", "@firebase/component": "0.6.4",
"@firebase/util": "1.9.3", "@firebase/util": "1.9.3",
"node-fetch": "2.6.7", "tslib": "^2.1.0",
"tslib": "^2.1.0" "undici": "5.26.5"
}, },
"peerDependencies": { "peerDependencies": {
"@firebase/app-compat": "0.x" "@firebase/app-compat": "0.x"
@ -2692,18 +2700,18 @@
} }
}, },
"node_modules/@firebase/firestore": { "node_modules/@firebase/firestore": {
"version": "4.2.0", "version": "4.4.0",
"resolved": "https://registry.npmjs.org/@firebase/firestore/-/firestore-4.2.0.tgz", "resolved": "https://registry.npmjs.org/@firebase/firestore/-/firestore-4.4.0.tgz",
"integrity": "sha512-iKZqIdOBJpJUcwY5airLX0W04TLrQSJuActOP1HG5WoIY5oyGTQE4Ml7hl5GW7mBqFieT4ojtUuDXj6MLrn1lA==", "integrity": "sha512-VeDXD9PUjvcWY1tInBOMTIu2pijR3YYy+QAe5cxCo1Q1vW+aA/mpQHhebPM1J6b4Zd1MuUh8xpBRvH9ujKR56A==",
"dependencies": { "dependencies": {
"@firebase/component": "0.6.4", "@firebase/component": "0.6.4",
"@firebase/logger": "0.4.0", "@firebase/logger": "0.4.0",
"@firebase/util": "1.9.3", "@firebase/util": "1.9.3",
"@firebase/webchannel-wrapper": "0.10.3", "@firebase/webchannel-wrapper": "0.10.5",
"@grpc/grpc-js": "~1.9.0", "@grpc/grpc-js": "~1.9.0",
"@grpc/proto-loader": "^0.7.8", "@grpc/proto-loader": "^0.7.8",
"node-fetch": "2.6.7", "tslib": "^2.1.0",
"tslib": "^2.1.0" "undici": "5.26.5"
}, },
"engines": { "engines": {
"node": ">=10.10.0" "node": ">=10.10.0"
@ -2713,12 +2721,12 @@
} }
}, },
"node_modules/@firebase/firestore-compat": { "node_modules/@firebase/firestore-compat": {
"version": "0.3.18", "version": "0.3.23",
"resolved": "https://registry.npmjs.org/@firebase/firestore-compat/-/firestore-compat-0.3.18.tgz", "resolved": "https://registry.npmjs.org/@firebase/firestore-compat/-/firestore-compat-0.3.23.tgz",
"integrity": "sha512-hkqv4mb1oScKbEtzfcK8Go8c0VpDWmbAvbD6B6XnphLqi27pkXgo9Rp+aSKlD7cBL29VMEekP5bEm9lSVfZpNw==", "integrity": "sha512-uUTBiP0GLVBETaOCfB11d33OWB8x1r2G1Xrl0sRK3Va0N5LJ/GRvKVSGfM7VScj+ypeHe8RpdwKoCqLpN1e+uA==",
"dependencies": { "dependencies": {
"@firebase/component": "0.6.4", "@firebase/component": "0.6.4",
"@firebase/firestore": "4.2.0", "@firebase/firestore": "4.4.0",
"@firebase/firestore-types": "3.0.0", "@firebase/firestore-types": "3.0.0",
"@firebase/util": "1.9.3", "@firebase/util": "1.9.3",
"tslib": "^2.1.0" "tslib": "^2.1.0"
@ -2737,29 +2745,29 @@
} }
}, },
"node_modules/@firebase/functions": { "node_modules/@firebase/functions": {
"version": "0.10.0", "version": "0.11.0",
"resolved": "https://registry.npmjs.org/@firebase/functions/-/functions-0.10.0.tgz", "resolved": "https://registry.npmjs.org/@firebase/functions/-/functions-0.11.0.tgz",
"integrity": "sha512-2U+fMNxTYhtwSpkkR6WbBcuNMOVaI7MaH3cZ6UAeNfj7AgEwHwMIFLPpC13YNZhno219F0lfxzTAA0N62ndWzA==", "integrity": "sha512-n1PZxKnJ++k73Q8khTPwihlbeKo6emnGzE0hX6QVQJsMq82y/XKmNpw2t/q30VJgwaia3ZXU1fd1C5wHncL+Zg==",
"dependencies": { "dependencies": {
"@firebase/app-check-interop-types": "0.3.0", "@firebase/app-check-interop-types": "0.3.0",
"@firebase/auth-interop-types": "0.2.1", "@firebase/auth-interop-types": "0.2.1",
"@firebase/component": "0.6.4", "@firebase/component": "0.6.4",
"@firebase/messaging-interop-types": "0.2.0", "@firebase/messaging-interop-types": "0.2.0",
"@firebase/util": "1.9.3", "@firebase/util": "1.9.3",
"node-fetch": "2.6.7", "tslib": "^2.1.0",
"tslib": "^2.1.0" "undici": "5.26.5"
}, },
"peerDependencies": { "peerDependencies": {
"@firebase/app": "0.x" "@firebase/app": "0.x"
} }
}, },
"node_modules/@firebase/functions-compat": { "node_modules/@firebase/functions-compat": {
"version": "0.3.5", "version": "0.3.6",
"resolved": "https://registry.npmjs.org/@firebase/functions-compat/-/functions-compat-0.3.5.tgz", "resolved": "https://registry.npmjs.org/@firebase/functions-compat/-/functions-compat-0.3.6.tgz",
"integrity": "sha512-uD4jwgwVqdWf6uc3NRKF8cSZ0JwGqSlyhPgackyUPe+GAtnERpS4+Vr66g0b3Gge0ezG4iyHo/EXW/Hjx7QhHw==", "integrity": "sha512-RQpO3yuHtnkqLqExuAT2d0u3zh8SDbeBYK5EwSCBKI9mjrFeJRXBnd3pEG+x5SxGJLy56/5pQf73mwt0OuH5yg==",
"dependencies": { "dependencies": {
"@firebase/component": "0.6.4", "@firebase/component": "0.6.4",
"@firebase/functions": "0.10.0", "@firebase/functions": "0.11.0",
"@firebase/functions-types": "0.6.0", "@firebase/functions-types": "0.6.0",
"@firebase/util": "1.9.3", "@firebase/util": "1.9.3",
"tslib": "^2.1.0" "tslib": "^2.1.0"
@ -2824,15 +2832,15 @@
} }
}, },
"node_modules/@firebase/messaging": { "node_modules/@firebase/messaging": {
"version": "0.12.4", "version": "0.12.5",
"resolved": "https://registry.npmjs.org/@firebase/messaging/-/messaging-0.12.4.tgz", "resolved": "https://registry.npmjs.org/@firebase/messaging/-/messaging-0.12.5.tgz",
"integrity": "sha512-6JLZct6zUaex4g7HI3QbzeUrg9xcnmDAPTWpkoMpd/GoSVWH98zDoWXMGrcvHeCAIsLpFMe4MPoZkJbrPhaASw==", "integrity": "sha512-i/rrEI2k9ueFhdIr8KQsptWGskrsnkC5TkohCTrJKz9P0C/PbNv14IAMkwhMJTqIur5VwuOnrUkc9Kdz7awekw==",
"dependencies": { "dependencies": {
"@firebase/component": "0.6.4", "@firebase/component": "0.6.4",
"@firebase/installations": "0.6.4", "@firebase/installations": "0.6.4",
"@firebase/messaging-interop-types": "0.2.0", "@firebase/messaging-interop-types": "0.2.0",
"@firebase/util": "1.9.3", "@firebase/util": "1.9.3",
"idb": "7.0.1", "idb": "7.1.1",
"tslib": "^2.1.0" "tslib": "^2.1.0"
}, },
"peerDependencies": { "peerDependencies": {
@ -2840,12 +2848,12 @@
} }
}, },
"node_modules/@firebase/messaging-compat": { "node_modules/@firebase/messaging-compat": {
"version": "0.2.4", "version": "0.2.5",
"resolved": "https://registry.npmjs.org/@firebase/messaging-compat/-/messaging-compat-0.2.4.tgz", "resolved": "https://registry.npmjs.org/@firebase/messaging-compat/-/messaging-compat-0.2.5.tgz",
"integrity": "sha512-lyFjeUhIsPRYDPNIkYX1LcZMpoVbBWXX4rPl7c/rqc7G+EUea7IEtSt4MxTvh6fDfPuzLn7+FZADfscC+tNMfg==", "integrity": "sha512-qHQZxm4hEG8/HFU/ls5/bU+rpnlPDoZoqi3ATMeb6s4hovYV9+PfV5I7ZrKV5eFFv47Hx1PWLe5uPnS4e7gMwQ==",
"dependencies": { "dependencies": {
"@firebase/component": "0.6.4", "@firebase/component": "0.6.4",
"@firebase/messaging": "0.12.4", "@firebase/messaging": "0.12.5",
"@firebase/util": "1.9.3", "@firebase/util": "1.9.3",
"tslib": "^2.1.0" "tslib": "^2.1.0"
}, },
@ -2858,11 +2866,6 @@
"resolved": "https://registry.npmjs.org/@firebase/messaging-interop-types/-/messaging-interop-types-0.2.0.tgz", "resolved": "https://registry.npmjs.org/@firebase/messaging-interop-types/-/messaging-interop-types-0.2.0.tgz",
"integrity": "sha512-ujA8dcRuVeBixGR9CtegfpU4YmZf3Lt7QYkcj693FFannwNuZgfAYaTmbJ40dtjB81SAu6tbFPL9YLNT15KmOQ==" "integrity": "sha512-ujA8dcRuVeBixGR9CtegfpU4YmZf3Lt7QYkcj693FFannwNuZgfAYaTmbJ40dtjB81SAu6tbFPL9YLNT15KmOQ=="
}, },
"node_modules/@firebase/messaging/node_modules/idb": {
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/idb/-/idb-7.0.1.tgz",
"integrity": "sha512-UUxlE7vGWK5RfB/fDwEGgRf84DY/ieqNha6msMV99UsEMQhJ1RwbCd8AYBj3QMgnE3VZnfQvm4oKVCJTYlqIgg=="
},
"node_modules/@firebase/performance": { "node_modules/@firebase/performance": {
"version": "0.6.4", "version": "0.6.4",
"resolved": "https://registry.npmjs.org/@firebase/performance/-/performance-0.6.4.tgz", "resolved": "https://registry.npmjs.org/@firebase/performance/-/performance-0.6.4.tgz",
@ -2936,26 +2939,26 @@
"integrity": "sha512-RtEH4vdcbXZuZWRZbIRmQVBNsE7VDQpet2qFvq6vwKLBIQRQR5Kh58M4ok3A3US8Sr3rubYnaGqZSurCwI8uMA==" "integrity": "sha512-RtEH4vdcbXZuZWRZbIRmQVBNsE7VDQpet2qFvq6vwKLBIQRQR5Kh58M4ok3A3US8Sr3rubYnaGqZSurCwI8uMA=="
}, },
"node_modules/@firebase/storage": { "node_modules/@firebase/storage": {
"version": "0.11.2", "version": "0.12.0",
"resolved": "https://registry.npmjs.org/@firebase/storage/-/storage-0.11.2.tgz", "resolved": "https://registry.npmjs.org/@firebase/storage/-/storage-0.12.0.tgz",
"integrity": "sha512-CtvoFaBI4hGXlXbaCHf8humajkbXhs39Nbh6MbNxtwJiCqxPy9iH3D3CCfXAvP0QvAAwmJUTK3+z9a++Kc4nkA==", "integrity": "sha512-SGs02Y/mmWBRsqZiYLpv4Sf7uZYZzMWVNN+aKiDqPsFBCzD6hLvGkXz+u98KAl8FqcjgB8BtSu01wm4pm76KHA==",
"dependencies": { "dependencies": {
"@firebase/component": "0.6.4", "@firebase/component": "0.6.4",
"@firebase/util": "1.9.3", "@firebase/util": "1.9.3",
"node-fetch": "2.6.7", "tslib": "^2.1.0",
"tslib": "^2.1.0" "undici": "5.26.5"
}, },
"peerDependencies": { "peerDependencies": {
"@firebase/app": "0.x" "@firebase/app": "0.x"
} }
}, },
"node_modules/@firebase/storage-compat": { "node_modules/@firebase/storage-compat": {
"version": "0.3.2", "version": "0.3.3",
"resolved": "https://registry.npmjs.org/@firebase/storage-compat/-/storage-compat-0.3.2.tgz", "resolved": "https://registry.npmjs.org/@firebase/storage-compat/-/storage-compat-0.3.3.tgz",
"integrity": "sha512-wvsXlLa9DVOMQJckbDNhXKKxRNNewyUhhbXev3t8kSgoCotd1v3MmqhKKz93ePhDnhHnDs7bYHy+Qa8dRY6BXw==", "integrity": "sha512-WNtjYPhpOA1nKcRu5lIodX0wZtP8pI0VxDJnk6lr+av7QZNS1s6zvr+ERDTve+Qu4Hq/ZnNaf3kBEQR2ccXn6A==",
"dependencies": { "dependencies": {
"@firebase/component": "0.6.4", "@firebase/component": "0.6.4",
"@firebase/storage": "0.11.2", "@firebase/storage": "0.12.0",
"@firebase/storage-types": "0.8.0", "@firebase/storage-types": "0.8.0",
"@firebase/util": "1.9.3", "@firebase/util": "1.9.3",
"tslib": "^2.1.0" "tslib": "^2.1.0"
@ -2982,14 +2985,14 @@
} }
}, },
"node_modules/@firebase/webchannel-wrapper": { "node_modules/@firebase/webchannel-wrapper": {
"version": "0.10.3", "version": "0.10.5",
"resolved": "https://registry.npmjs.org/@firebase/webchannel-wrapper/-/webchannel-wrapper-0.10.3.tgz", "resolved": "https://registry.npmjs.org/@firebase/webchannel-wrapper/-/webchannel-wrapper-0.10.5.tgz",
"integrity": "sha512-+ZplYUN3HOpgCfgInqgdDAbkGGVzES1cs32JJpeqoh87SkRobGXElJx+1GZSaDqzFL+bYiX18qEcBK76mYs8uA==" "integrity": "sha512-eSkJsnhBWv5kCTSU1tSUVl9mpFu+5NXXunZc83le8GMjMlsWwQArSc7cJJ4yl+aDFY0NGLi0AjZWMn1axOrkRg=="
}, },
"node_modules/@grpc/grpc-js": { "node_modules/@grpc/grpc-js": {
"version": "1.9.3", "version": "1.9.12",
"resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.9.3.tgz", "resolved": "https://registry.npmjs.org/@grpc/grpc-js/-/grpc-js-1.9.12.tgz",
"integrity": "sha512-b8iWtdrYIeT5fdZdS4Br/6h/kuk0PW5EVBUGk1amSbrpL8DlktJD43CdcCWwRdd6+jgwHhADSbL9CsNnm6EUPA==", "integrity": "sha512-Um5MBuge32TS3lAKX02PGCnFM4xPT996yLgZNb5H03pn6NyJ4Iwn5YcPq6Jj9yxGRk7WOgaZFtVRH5iTdYBeUg==",
"dependencies": { "dependencies": {
"@grpc/proto-loader": "^0.7.8", "@grpc/proto-loader": "^0.7.8",
"@types/node": ">=12.12.47" "@types/node": ">=12.12.47"
@ -2999,9 +3002,9 @@
} }
}, },
"node_modules/@grpc/proto-loader": { "node_modules/@grpc/proto-loader": {
"version": "0.7.9", "version": "0.7.10",
"resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.7.9.tgz", "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.7.10.tgz",
"integrity": "sha512-YJsOehVXzgurc+lLAxYnlSMc1p/Gu6VAvnfx0ATi2nzvr0YZcjhmZDeY8SeAKv1M7zE3aEJH0Xo9mK1iZ8GYoQ==", "integrity": "sha512-CAqDfoaQ8ykFd9zqBDn4k6iWT9loLAlc2ETmDFS9JCD70gDcnA4L3AFEo2iV7KyAtAAHFW9ftq1Fz+Vsgq80RQ==",
"dependencies": { "dependencies": {
"lodash.camelcase": "^4.3.0", "lodash.camelcase": "^4.3.0",
"long": "^5.0.0", "long": "^5.0.0",
@ -10682,35 +10685,35 @@
} }
}, },
"node_modules/firebase": { "node_modules/firebase": {
"version": "10.4.0", "version": "10.7.0",
"resolved": "https://registry.npmjs.org/firebase/-/firebase-10.4.0.tgz", "resolved": "https://registry.npmjs.org/firebase/-/firebase-10.7.0.tgz",
"integrity": "sha512-3Z8WsNwA7kbcKGZ+nrTZ/ES518pk0K440ZJYD8nUNKN5hV6ll+unhUw30t1msedN6yIFjhsC/9OwT4Z0ohwO2w==", "integrity": "sha512-t6ZwJQhmq0m7kSssVeu5a1DdmZ0YEBWgNFtpmcvU3PiffWdGVlri6yaX/BK5i4cRtGuQjVPPAEmB90TCpLF5GQ==",
"dependencies": { "dependencies": {
"@firebase/analytics": "0.10.0", "@firebase/analytics": "0.10.0",
"@firebase/analytics-compat": "0.2.6", "@firebase/analytics-compat": "0.2.6",
"@firebase/app": "0.9.19", "@firebase/app": "0.9.24",
"@firebase/app-check": "0.8.0", "@firebase/app-check": "0.8.0",
"@firebase/app-check-compat": "0.3.7", "@firebase/app-check-compat": "0.3.7",
"@firebase/app-compat": "0.2.19", "@firebase/app-compat": "0.2.24",
"@firebase/app-types": "0.9.0", "@firebase/app-types": "0.9.0",
"@firebase/auth": "1.3.0", "@firebase/auth": "1.5.0",
"@firebase/auth-compat": "0.4.6", "@firebase/auth-compat": "0.5.0",
"@firebase/database": "1.0.1", "@firebase/database": "1.0.1",
"@firebase/database-compat": "1.0.1", "@firebase/database-compat": "1.0.1",
"@firebase/firestore": "4.2.0", "@firebase/firestore": "4.4.0",
"@firebase/firestore-compat": "0.3.18", "@firebase/firestore-compat": "0.3.23",
"@firebase/functions": "0.10.0", "@firebase/functions": "0.11.0",
"@firebase/functions-compat": "0.3.5", "@firebase/functions-compat": "0.3.6",
"@firebase/installations": "0.6.4", "@firebase/installations": "0.6.4",
"@firebase/installations-compat": "0.2.4", "@firebase/installations-compat": "0.2.4",
"@firebase/messaging": "0.12.4", "@firebase/messaging": "0.12.5",
"@firebase/messaging-compat": "0.2.4", "@firebase/messaging-compat": "0.2.5",
"@firebase/performance": "0.6.4", "@firebase/performance": "0.6.4",
"@firebase/performance-compat": "0.2.4", "@firebase/performance-compat": "0.2.4",
"@firebase/remote-config": "0.4.4", "@firebase/remote-config": "0.4.4",
"@firebase/remote-config-compat": "0.2.4", "@firebase/remote-config-compat": "0.2.4",
"@firebase/storage": "0.11.2", "@firebase/storage": "0.12.0",
"@firebase/storage-compat": "0.3.2", "@firebase/storage-compat": "0.3.3",
"@firebase/util": "1.9.3" "@firebase/util": "1.9.3"
} }
}, },
@ -16027,6 +16030,7 @@
"version": "2.6.7", "version": "2.6.7",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz",
"integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==",
"peer": true,
"dependencies": { "dependencies": {
"whatwg-url": "^5.0.0" "whatwg-url": "^5.0.0"
}, },
@ -21625,7 +21629,8 @@
"node_modules/tr46": { "node_modules/tr46": {
"version": "0.0.3", "version": "0.0.3",
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==",
"peer": true
}, },
"node_modules/tryer": { "node_modules/tryer": {
"version": "1.0.1", "version": "1.0.1",
@ -21864,6 +21869,17 @@
"resolved": "https://registry.npmjs.org/underscore/-/underscore-1.12.1.tgz", "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.12.1.tgz",
"integrity": "sha512-hEQt0+ZLDVUMhebKxL4x1BTtDY7bavVofhZ9KZ4aI26X9SRaE+Y3m83XUL1UP2jn8ynjndwCCpEHdUG+9pP1Tw==" "integrity": "sha512-hEQt0+ZLDVUMhebKxL4x1BTtDY7bavVofhZ9KZ4aI26X9SRaE+Y3m83XUL1UP2jn8ynjndwCCpEHdUG+9pP1Tw=="
}, },
"node_modules/undici": {
"version": "5.26.5",
"resolved": "https://registry.npmjs.org/undici/-/undici-5.26.5.tgz",
"integrity": "sha512-cSb4bPFd5qgR7qr2jYAi0hlX9n5YKK2ONKkLFkxl+v/9BvC0sOpZjBHDBSXc5lWAf5ty9oZdRXytBIHzgUcerw==",
"dependencies": {
"@fastify/busboy": "^2.0.0"
},
"engines": {
"node": ">=14.0"
}
},
"node_modules/unicode-canonical-property-names-ecmascript": { "node_modules/unicode-canonical-property-names-ecmascript": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz",
@ -22717,6 +22733,7 @@
"version": "5.0.0", "version": "5.0.0",
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
"integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
"peer": true,
"dependencies": { "dependencies": {
"tr46": "~0.0.3", "tr46": "~0.0.3",
"webidl-conversions": "^3.0.0" "webidl-conversions": "^3.0.0"
@ -22725,7 +22742,8 @@
"node_modules/whatwg-url/node_modules/webidl-conversions": { "node_modules/whatwg-url/node_modules/webidl-conversions": {
"version": "3.0.1", "version": "3.0.1",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
"integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==",
"peer": true
}, },
"node_modules/which": { "node_modules/which": {
"version": "2.0.2", "version": "2.0.2",

View File

@ -8,7 +8,7 @@
"@testing-library/user-event": "^13.5.0", "@testing-library/user-event": "^13.5.0",
"bootstrap": "^5.3.2", "bootstrap": "^5.3.2",
"create-react-app": "^5.0.1", "create-react-app": "^5.0.1",
"firebase": "^10.4.0", "firebase": "^10.7.0",
"firebase-tools": "^0.1.6", "firebase-tools": "^0.1.6",
"react": "^18.2.0", "react": "^18.2.0",
"react-bootstrap": "^2.8.0", "react-bootstrap": "^2.8.0",

View File

@ -7,7 +7,7 @@
<meta name="theme-color" content="#000000" /> <meta name="theme-color" content="#000000" />
<meta <meta
name="description" name="description"
content="This website showcases various excellent books to read!" content="This website showcases thy beautiful artwork of systie"
/> />
<link rel="apple-touch-icon" href="%PUBLIC_URL%/apple-touch-icon.png" /> <link rel="apple-touch-icon" href="%PUBLIC_URL%/apple-touch-icon.png" />
<!-- <!--
@ -24,7 +24,7 @@
work correctly both with client-side routing and a non-root public URL. work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`. Learn how to configure a non-root public URL by running `npm run build`.
--> -->
<title>Ray's Book Club</title> <title>systie</title>
</head> </head>
<body> <body>
<noscript>You need to enable JavaScript to run this app.</noscript> <noscript>You need to enable JavaScript to run this app.</noscript>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.8 KiB

After

Width:  |  Height:  |  Size: 8.0 KiB

View File

@ -2,13 +2,6 @@ import { FirebaseConfig } from "./config/Config"
import { initializeApp } from "firebase/app" import { initializeApp } from "firebase/app"
import { Routes, Route } from "react-router-dom" import { Routes, Route } from "react-router-dom"
import { useState, useEffect } from "react" import { useState, useEffect } from "react"
import {
getAuth,
createUserWithEmailAndPassword,
onAuthStateChanged,
signOut,
signInWithEmailAndPassword
} from "firebase/auth";
import { import {
getFirestore, getFirestore,
collection, collection,
@ -25,19 +18,14 @@ import './App.css'
import { About } from "./pages/About" import { About } from "./pages/About"
import { Home } from "./pages/Home" import { Home } from "./pages/Home"
import { Contact } from "./pages/Contact" import { Contact } from "./pages/Contact"
import { Signup } from "./pages/Signup"
import { Signout } from "./pages/Signout"
import { Signin } from "./pages/Signin"
import { Detail } from "./pages/Detail"; import { Detail } from "./pages/Detail";
// contexts // contexts
import { AuthContext } from "./contexts/AuthContext"
import { StorageContext } from "./contexts/StorageContext"; import { StorageContext } from "./contexts/StorageContext";
function App() { function App() {
const FBapp = initializeApp(FirebaseConfig) const FBapp = initializeApp(FirebaseConfig)
const FBauth = getAuth(FBapp)
const FBdb = getFirestore(FBapp) const FBdb = getFirestore(FBapp)
const FBstorage = getStorage(FBapp) const FBstorage = getStorage(FBapp)
@ -47,16 +35,8 @@ function App() {
{ label: "Home", link: "/" }, { label: "Home", link: "/" },
{ label: "About", link: "/about" }, { label: "About", link: "/about" },
{ label: "Contact", link: "/contact" }, { label: "Contact", link: "/contact" },
{ label: "Create Account", link: "/signup" },
{ label: "Log in", link: "/signin" },
]
// navigation for authenticated user
const AuthnavItems = [
{ label: "Home", link: "/" },
{ label: "About", link: "/about" },
{ label: "Contact", link: "/contact" },
] ]
/// application states /// application states
const [nav, setNav] = useState(navItems) const [nav, setNav] = useState(navItems)
@ -72,58 +52,20 @@ function App() {
}, [data]) }, [data])
// authentication observer
onAuthStateChanged(FBauth, (user) => {
if (user) {
// currently authenticated
setAuth(user)
setNav(AuthnavItems)
}
else {
// currently unauthenticated
setAuth(false)
setNav(navItems)
}
})
const saySomething = (word) => { const saySomething = (word) => {
alert(word) alert(word)
} }
// signing up a user
const signUp = (email, password) => {
createUserWithEmailAndPassword(FBauth, email, password)
.then((userCredential) => {
// do something
})
.catch((error) => console.log(error.message))
}
const logOut = () => {
signOut(FBauth).then(() => {
// user is signed out
})
}
const signIn = (email, password) => {
return new Promise((resolve, reject) => {
signInWithEmailAndPassword(FBauth, email, password)
.then(() => {
// user is signed in
resolve(true)
})
.catch((error) => {
console.log(error)
reject(error.code)
})
})
}
// function to get data // function to get data
const readData = async () => { const readData = async () => {
const querySnapshot = await getDocs(collection(FBdb, "books")) const querySnapshot = await getDocs(collection(FBdb, "artworks"))
let listdata = [] let listdata = []
querySnapshot.forEach((doc) => { querySnapshot.forEach((doc) => {
let item = doc.data() let item = doc.data()
@ -136,7 +78,7 @@ function App() {
// function to get a single item // function to get a single item
const getDocument = async (itemId) => { const getDocument = async (itemId) => {
const docRef = doc(FBdb, "books", itemId) const docRef = doc(FBdb, "artworks", itemId)
const docSnap = await getDoc(docRef) const docSnap = await getDoc(docRef)
let book = docSnap.data() let book = docSnap.data()
book.id = itemId book.id = itemId
@ -147,21 +89,16 @@ function App() {
return ( return (
<div className="App"> <div className="App">
<Header items={nav} user={auth} /> <Header items={nav} user={auth} />
<AuthContext.Provider value={auth}>
<StorageContext.Provider value={FBstorage}> <StorageContext.Provider value={FBstorage}>
<Routes> <Routes>
<Route path="/" element={<Home items={data} />} /> <Route path="/" element={<Home items={data} />} />
<Route path="/about" element={<About greeting="Hey you, this is about page!" handler={saySomething} />} /> <Route path="/about" element={<About greeting="Hey you, this is about page!" handler={saySomething} />} />
<Route path="/contact" element={<Contact greeting="Hey you, this is contact page!" />} /> <Route path="/contact" element={<Contact greeting="Hey you, this is contact page!" />} />
<Route path="/signup" element={<Signup handler={signUp} />} />
<Route path="/signout" element={<Signout handler={logOut} />} />
<Route path="/signin" element={<Signin handler={signIn} authstate={auth} />} />
<Route path="/detail/:id" element={<Detail handler={getDocument} />} /> <Route path="/detail/:id" element={<Detail handler={getDocument} />} />
</Routes> </Routes>
</StorageContext.Provider> </StorageContext.Provider>
</AuthContext.Provider>
</div> </div>
); );
} }
export default App; export default App;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

After

Width:  |  Height:  |  Size: 7.3 KiB

View File

@ -29,7 +29,7 @@ export function Header(props) {
return ( return (
<Navbar className="mb-3"> <Navbar className="mb-3">
<Container> <Container>
<Navbar.Brand>Ray's Book Club</Navbar.Brand> <Navbar.Brand>systie</Navbar.Brand>
<Nav> <Nav>
{Links} {Links}
<NavDropdown title={props.user.email}> <NavDropdown title={props.user.email}>

View File

@ -1,38 +0,0 @@
import React, { Component } from "react";
import ReactSearchBox from "react-search-box";
export default class App extends Component {
data = [
{
key: "john",
value: "John Doe",
},
{
key: "jane",
value: "Jane Doe",
},
{
key: "mary",
value: "Mary Phillips",
},
{
key: "robert",
value: "Robert",
},
{
key: "karius",
value: "Karius",
},
];
render() {
return (
<ReactSearchBox
placeholder="Search book collection"
value="Book"
data={book.data}
callback={(record) => console.log(record)}
/>
);
}
}

View File

@ -1,9 +1,10 @@
export const FirebaseConfig = { export const FirebaseConfig = {
apiKey: "AIzaSyAL9_SCfMisIz7-kwV9ZBZzlG7y4lsGKdc", apiKey: "AIzaSyBs-x5UvVLoR4ltuLif3rEt5cCTpI93xCY",
authDomain: "rayyan-h-tafe-nsw.firebaseapp.com", authDomain: "systie.firebaseapp.com",
projectId: "rayyan-h-tafe-nsw", projectId: "systie",
storageBucket: "rayyan-h-tafe-nsw.appspot.com", storageBucket: "systie.appspot.com",
messagingSenderId: "579661195251", messagingSenderId: "660143302275",
appId: "1:579661195251:web:107f8e4fcd7879c1c45486" appId: "1:660143302275:web:62e0359ed606f2147a9db6",
measurementId: "G-LK7CNGHC0F"
} }

View File

@ -1,3 +0,0 @@
import { createContext } from "react";
export const AuthContext = createContext()

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.8 KiB

After

Width:  |  Height:  |  Size: 8.0 KiB

View File

@ -8,64 +8,36 @@ import { ItemImage } from '../components/ItemImage';
import Button from 'react-bootstrap/Button'; import Button from 'react-bootstrap/Button';
export function Detail(props) { export function Detail(props) {
const [bookData, setBookData] = useState() const [artworkData, setArtworkData] = useState()
let { id } = useParams(); let { id } = useParams();
useEffect(() => { useEffect(() => {
if (!bookData) { if (!artworkData) {
props.handler(id).then((book) => setBookData(book)) props.handler(id).then((art) => setArtworkData(art))
} }
}, [id]) }, [id])
if (bookData) { if (artworkData) {
return ( return (
<Container> <Container>
<Row> <Row>
<Col> <Col>
<h1 className="my-4">{bookData.book_title}</h1> <h1 className="my-4">{artworkData.artwork_title}</h1>
</Col> </Col>
</Row> </Row>
<Row> <Row>
<Col md={6}> <Col md={6}>
<ItemImage source={bookData.cover_image} /> <ItemImage source={artworkData.artwork_image} />
</Col> </Col>
<Col md={6}> <Col md={6}>
<h2>More information</h2> <h2>More information</h2>
<h3>Summary</h3> <h3>Artwork description</h3>
<p>{bookData.summary}</p> <p>{artworkData.summary}</p>
<h3>Author</h3> <h3>Author</h3>
<p>{bookData.author}</p> <p>systie</p>
<h3>ISBN</h3>
<p>ISBN10: {bookData.isbn10}</p>
<p>ISBN13: {bookData.isbn13}</p>
<Form>
<h3>Review this book</h3>
<Form.Group>
<Form.Label>Star</Form.Label>
<Form.Select>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</Form.Select>
</Form.Group>
<Form.Group>
<Form.Label>Title</Form.Label>
<Form.Control type="text" placeholder="I love this book" />
</Form.Group>
<Form.Group>
<Form.Label>Review</Form.Label>
<Form.Control as="textarea" rows={3} cols={30} placeholder="I could not put this down!" />
</Form.Group>
<Button type="submit" variant="primary">Submit</Button>
<Form.Group>
<h3>Existing reviews of this book</h3>
<p>To be added</p>
</Form.Group>
</Form>
</Col> </Col>
</Row> </Row>
<Row> <Row>

View File

@ -1,109 +0,0 @@
import Form from "react-bootstrap/Form"
import Container from "react-bootstrap/Container"
import Row from "react-bootstrap/Row"
import Col from "react-bootstrap/Col"
import Button from "react-bootstrap/Button"
import {useState, useEffect} from 'react'
import { useNavigate } from 'react-router-dom';
export function Signin( props ) {
const [email,setEmail] = useState('')
const [validemail, setValidemail] = useState(false)
const [password,setPassword] = useState('')
const [validpassword, setValidpassword ] = useState(false)
const [errorCode, setErrorCode] = useState()
const navigate = useNavigate()
useEffect( () => {
if( email.indexOf('@') > 0 ) {
setValidemail(true)
}
else {
setValidemail( false )
}
} , [email])
useEffect( () => {
if( password.length >= 8 ) {
setValidpassword( true )
}
else {
setValidpassword( false )
}
} , [password])
useEffect( () => {
if( props.authstate ) {
navigate("/")
}
}, [props.authstate])
const submitHandler = (evt) => {
evt.preventDefault()
props.handler( email, password )
.then((response) => {
if( response ) {
// sign in successful
}
})
.catch( (code) => {
//console.log(code)
// setErrorCode( code )
switch(code) {
case "auth/invalid-email" :
setErrorCode("The email address is invalid")
break
case "auth/invalid-login-credentials" :
setErrorCode("Credentials supplied is not in our system")
break
case "auth/user-not-found" :
setErrorCode("Credentials supplied is not in our system")
break
break
default:
break
}
})
}
return(
<Container>
<Row>
<Col md={ {span: 4, offset: 4} }>
<Form onSubmit={ submitHandler }>
<Form.Group>
<Form.Label>Email</Form.Label>
<Form.Control
type="email"
name="email"
placeholder="you@example.com"
value={ email }
onChange={ (evt) => setEmail(evt.target.value) }
/>
</Form.Group>
<Form.Group>
<Form.Label>Password</Form.Label>
<Form.Control
type="password"
name="password"
placeholder="your password"
value={ password }
onChange={ (evt) => setPassword(evt.target.value) }
/>
</Form.Group>
<Button
variant="primary"
className="mt-3 w-100"
type="submit"
disabled={ (validemail && validpassword) ? false : true }
>
Sign in
</Button>
<Form.Text>{errorCode}</Form.Text>
</Form>
</Col>
</Row>
</Container>
)
}

View File

@ -1,23 +0,0 @@
import { useEffect } from 'react';
import { Container, Row, Col } from 'react-bootstrap';
import { useNavigate } from 'react-router-dom';
export function Signout( props ) {
const nav = useNavigate()
useEffect(() => {
props.handler()
nav("/")
})
return (
<Container>
<Row>
<Col>
{/*Signout*/}
</Col>
</Row>
</Container>
);
}

View File

@ -1,106 +0,0 @@
import Form from 'react-bootstrap/Form';
import Container from 'react-bootstrap/Container';
import Row from 'react-bootstrap/Row';
import Col from 'react-bootstrap/Col';
import Button from "react-bootstrap/Button";
import {useState, useEffect, useContext} from 'react';
import { AuthContext } from "../contexts/AuthContext";
import {useNavigate} from 'react-router-dom';
export function Signup ( props ) {
const[username,setUsername] = useState('')
const[validusername,setValidusername] = useState(false)
const[useremail,setUseremail] = useState('')
const[validemail,setValidemail] = useState(false)
const[userpassword,setUserpassword] = useState('')
const[validpassword,setValidpassword] = useState(false)
const auth = useContext(AuthContext)
const submitHandler = (evt) => {
evt.preventDefault()
props.handler( useremail, userpassword )
}
const navigate = useNavigate()
useEffect( () => {
if( auth ) {
// go to home page
console.log(auth)
navigate("/")
}
}, [auth,])
useEffect( () => {
if( username.length >= 4 ) {
setValidusername(true)
}
else {
setValidusername(false)
}
}, [username] )
useEffect( () => {
if( useremail.indexOf('@') > 0 ) {
setValidemail(true)
}
else {
setValidemail(false)
}
}, [useremail])
useEffect( () => {
if( userpassword.length >= 8 ) {
setValidpassword(true)
}
else{
setValidpassword(false)
}
}, [userpassword])
return (
<Container>
<Row>
<Col md={{span: 4, offset:4}}>
<Form onSubmit={submitHandler}>
<Form.Group>
<Form.Label>Username</Form.Label>
<Form.Control
type="text"
name="username"
placeholder='username'
onChange={ (evt) => setUsername(evt.target.value) }
/>
</Form.Group>
<Form.Group>
<Form.Label>Email</Form.Label>
<Form.Control
type="email"
name="email"
placeholder="you@example.com"
onChange={ (evt) => setUseremail(evt.target.value) }
/>
</Form.Group>
<Form.Group>
<Form.Label>Password</Form.Label>
<Form.Control
type="password"
name="password"
placeholder='password'
onChange={ (evt) => setUserpassword(evt.target.value) }
/>
</Form.Group>
<Button
variant="primary"
className="mt-3 w-100"
type="submit"
disabled={ (validemail && validpassword && validusername) ? false : true }
>Sign up
</Button>
</Form>
</Col>
</Row>
</Container>
)
}

View File

@ -6,7 +6,7 @@ rules_version = '2';
service firebase.storage { service firebase.storage {
match /b/{bucket}/o { match /b/{bucket}/o {
match /{allPaths=**} { match /{allPaths=**} {
allow read, write: if true; allow read, write: if false;
} }
} }
} }