Skip to content

Commit

Permalink
beta 103
Browse files Browse the repository at this point in the history
  • Loading branch information
TheGemDev committed Jan 8, 2021
1 parent 48c1825 commit b8eeb31
Show file tree
Hide file tree
Showing 14 changed files with 353 additions and 79 deletions.
2 changes: 1 addition & 1 deletion app/.eslintcache
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"C:\\Users\\Unekwu\\Documents\\GitHub\\Gem-Chat\\app\\src\\index.js":"1","C:\\Users\\Unekwu\\Documents\\GitHub\\Gem-Chat\\app\\src\\reportWebVitals.js":"2","C:\\Users\\Unekwu\\Documents\\GitHub\\Gem-Chat\\app\\src\\App.js":"3","C:\\Users\\Unekwu\\Documents\\GitHub\\Gem-Chat\\app\\src\\pages\\chatRoom.js":"4","C:\\Users\\Unekwu\\Documents\\GitHub\\Gem-Chat\\app\\src\\pages\\signin.js":"5"},{"size":500,"mtime":1606514346749,"results":"6","hashOfConfig":"7"},{"size":362,"mtime":1606514346749,"results":"8","hashOfConfig":"7"},{"size":3014,"mtime":1609161815644,"results":"9","hashOfConfig":"7"},{"size":0,"mtime":1609017668807,"results":"10","hashOfConfig":"11"},{"size":0,"mtime":1609157743215,"results":"12","hashOfConfig":"11"},{"filePath":"13","messages":"14","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1prpj7m",{"filePath":"15","messages":"16","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"17","messages":"18","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"19","messages":"20","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"21"},"1w1fwub",{"filePath":"22","messages":"23","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"21"},"C:\\Users\\Unekwu\\Documents\\GitHub\\Gem-Chat\\app\\src\\index.js",[],"C:\\Users\\Unekwu\\Documents\\GitHub\\Gem-Chat\\app\\src\\reportWebVitals.js",[],"C:\\Users\\Unekwu\\Documents\\GitHub\\Gem-Chat\\app\\src\\App.js",["24"],"C:\\Users\\Unekwu\\Documents\\GitHub\\Gem-Chat\\app\\src\\pages\\chatRoom.js",[],["25","26"],"C:\\Users\\Unekwu\\Documents\\GitHub\\Gem-Chat\\app\\src\\pages\\signin.js",[],{"ruleId":"27","severity":1,"message":"28","line":25,"column":7,"nodeType":"29","messageId":"30","endLine":25,"endColumn":16},{"ruleId":"31","replacedBy":"32"},{"ruleId":"33","replacedBy":"34"},"no-unused-vars","'analytics' is assigned a value but never used.","Identifier","unusedVar","no-native-reassign",["35"],"no-negated-in-lhs",["36"],"no-global-assign","no-unsafe-negation"]
[{"C:\\Users\\Unekwu\\Documents\\GitHub\\Gem-Chat\\app\\src\\index.js":"1","C:\\Users\\Unekwu\\Documents\\GitHub\\Gem-Chat\\app\\src\\reportWebVitals.js":"2","C:\\Users\\Unekwu\\Documents\\GitHub\\Gem-Chat\\app\\src\\App.js":"3","C:\\Users\\Unekwu\\Documents\\GitHub\\Gem-Chat\\app\\src\\pages\\chatRoom.js":"4","C:\\Users\\Unekwu\\Documents\\GitHub\\Gem-Chat\\app\\src\\services\\firebase\\firebase.js":"5","C:\\Users\\Unekwu\\Documents\\GitHub\\Gem-Chat\\app\\src\\components\\TextArea.js":"6","C:\\Users\\Unekwu\\Documents\\GitHub\\Gem-Chat\\app\\src\\components\\pageHeader.js":"7","C:\\Users\\Unekwu\\Documents\\GitHub\\Gem-Chat\\app\\src\\components\\signIn.js":"8","C:\\Users\\Unekwu\\Documents\\GitHub\\Gem-Chat\\app\\src\\components\\messageInput.js":"9"},{"size":500,"mtime":1609330073573,"results":"10","hashOfConfig":"11"},{"size":362,"mtime":1606514346749,"results":"12","hashOfConfig":"11"},{"size":4054,"mtime":1610114169516,"results":"13","hashOfConfig":"11"},{"size":2179,"mtime":1610048758705,"results":"14","hashOfConfig":"15"},{"size":604,"mtime":1610048417545,"results":"16","hashOfConfig":"15"},{"size":1703,"mtime":1610027086366,"results":"17","hashOfConfig":"15"},{"size":198,"mtime":1610113992824,"results":"18","hashOfConfig":"11"},{"size":793,"mtime":1610049611105,"results":"19","hashOfConfig":"15"},{"size":1045,"mtime":1610105425150,"results":"20","hashOfConfig":"15"},{"filePath":"21","messages":"22","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1prpj7m",{"filePath":"23","messages":"24","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"25","messages":"26","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"27","messages":"28","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"29","usedDeprecatedRules":"30"},"1w1fwub",{"filePath":"31","messages":"32","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"30"},{"filePath":"33","messages":"34","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"35"},{"filePath":"36","messages":"37","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"38","messages":"39","errorCount":0,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":"40","usedDeprecatedRules":"30"},{"filePath":"41","messages":"42","errorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":"43","usedDeprecatedRules":"35"},"C:\\Users\\Unekwu\\Documents\\GitHub\\Gem-Chat\\app\\src\\index.js",[],"C:\\Users\\Unekwu\\Documents\\GitHub\\Gem-Chat\\app\\src\\reportWebVitals.js",[],"C:\\Users\\Unekwu\\Documents\\GitHub\\Gem-Chat\\app\\src\\App.js",["44"],"C:\\Users\\Unekwu\\Documents\\GitHub\\Gem-Chat\\app\\src\\pages\\chatRoom.js",["45"],"import React, {useRef, useState} from 'react';\r\nimport { useCollectionData } from 'react-firebase-hooks/firestore';\r\nimport { Form, Button, Input} from 'antd';\r\n\r\n\r\nimport firebase from 'firebase/app';\r\nimport 'firebase/firestore';\r\nimport 'firebase/auth';\r\nimport 'firebase/analytics';\r\nconst auth = firebase.auth();\r\nconst firestore = firebase.firestore();\r\nconst analytics = firebase.analytics();\r\n\r\n\r\nfunction ChatRoom() {\r\n const dummy = useRef();\r\n const messagesRef = firestore.collection('messages');\r\n const query = messagesRef.orderBy('createdAt').limit(500);\r\n\r\n const [messages] = useCollectionData(query, { idField: 'id' });\r\n\r\n const [formValue, setFormValue] = useState('');\r\n\r\n\r\n const sendMessage = async (e) => {\r\n e.preventDefault();\r\n\r\n const { uid, photoURL } = auth.currentUser;\r\n\r\n await messagesRef.add({\r\n text: formValue,\r\n createdAt: firebase.firestore.FieldValue.serverTimestamp(),\r\n uid,\r\n photoURL\r\n })\r\n\r\n setFormValue('');\r\n dummy.current.scrollIntoView({ behavior: 'smooth' });\r\n }\r\n\r\n return (<>\r\n <main>\r\n\r\n {messages && messages.map(msg => <ChatMessage key={msg.id} message={msg} />)}\r\n\r\n <span ref={dummy}></span>\r\n\r\n </main>\r\n\r\n <Form onSubmit={sendMessage} layout='inline'>\r\n <Input \r\n id=\"outlined-basic\" \r\n label=\"message\"\r\n placeHolder='hello' \r\n enterButton\r\n value={formValue} \r\n onChange={(e) => setFormValue(e.target.value)} \r\n />\r\n <Button className=\"sign-out\" disabled={!formValue} type=\"submit\">SEND</Button>\r\n \r\n {/*<IconButton type=\"submit\" disabled={!formValue} variant=\"contained\" color=\"primary\" disableElevation multiline rows={4}><SendIcon /></IconButton>*/}\r\n </Form>\r\n </>)\r\n};\r\n\r\nfunction ChatMessage(props) {\r\n const { text, uid, photoURL } = props.message;\r\n\r\n const messageClass = uid === auth.currentUser.uid ? 'sent' : 'received';\r\n\r\n return (<>\r\n <div className={`message ${messageClass}`}>\r\n <img alt={'img'} src={photoURL || 'https://api.adorable.io/avatars/23/[email protected]'} />\r\n <p>{text}</p>\r\n </div>\r\n </>)\r\n}\r\n\r\nexport { \r\n ChatRoom,\r\n ChatMessage\r\n}\r\n",["46","47"],"C:\\Users\\Unekwu\\Documents\\GitHub\\Gem-Chat\\app\\src\\services\\firebase\\firebase.js",[],"C:\\Users\\Unekwu\\Documents\\GitHub\\Gem-Chat\\app\\src\\components\\TextArea.js",[],["48","49"],"C:\\Users\\Unekwu\\Documents\\GitHub\\Gem-Chat\\app\\src\\components\\pageHeader.js",[],"C:\\Users\\Unekwu\\Documents\\GitHub\\Gem-Chat\\app\\src\\components\\signIn.js",["50","51","52","53"],"import React, { useRef, useState } from 'react';\r\nimport { Button } from 'antd';\r\n\r\nimport firebase from 'firebase/app';\r\nimport 'firebase/firestore';\r\nimport 'firebase/auth';\r\nimport 'firebase/analytics';\r\n\r\nimport { useAuthState } from 'react-firebase-hooks/auth';\r\nimport { useCollectionData } from 'react-firebase-hooks/firestore';\r\n\r\n\r\nfirebase.initializeApp()\r\n\r\n\r\nconst auth = firebase.auth();\r\n\r\n\r\nexport default function SignIn() {\r\n\r\n const signInWithGoogle = () => {\r\n const provider = new firebase.auth.GoogleAuthProvider();\r\n auth.signInWithPopup(provider);\r\n }\r\n \r\n return (\r\n <>\r\n <Button className=\"sign-in\" onClick={signInWithGoogle} type=\"primary\">Sign in with Google</Button>\r\n <p>A Free Chat App</p>\r\n </>\r\n )\r\n \r\n }\r\n ","C:\\Users\\Unekwu\\Documents\\GitHub\\Gem-Chat\\app\\src\\components\\messageInput.js",["54","55","56"],"// this would be available in future updates\r\n\r\n\r\nimport React, {useState, useRef} from 'react';\r\nimport {Input, Form, Button} from 'antd';\r\n\r\nconst layout = {\r\n labelCol: { span: 100},\r\n wrapperCol: { span: 100},\r\n};\r\n\r\n//available in future updates\r\n\r\n/*const tailLayout = {\r\n wrapperCol: {offset: 1, span: 100 }\r\n};*/\r\n\r\n\r\nconst FormItem = Form.Item;\r\n\r\n//export this in the future\r\n\r\nfunction Messageinput() {\r\n \r\n return (\r\n <Form \r\n style={{position: 'sticky', bottom: '0'}}\r\n {...layout}\r\n layout='inline'\r\n onFinish={console.log('done')}\r\n >\r\n <FormItem name='title' style={{width: '80%', marginBottom: 0, marginRight: 0 }} >\r\n <Input \r\n placeholder='hello'\r\n //value={!formValue}\r\n />\r\n </FormItem>\r\n <FormItem /*{...tailLayout}*/ style={{marginBottom: 0, marginRight: 0, width: '20%' }}>\r\n <Button \r\n type='primary'\r\n htmlType='submit'\r\n //disabled={!formValue}\r\n >Send</Button>\r\n </FormItem>\r\n </Form>\r\n)\r\n}",{"ruleId":"57","severity":1,"message":"58","line":31,"column":7,"nodeType":"59","messageId":"60","endLine":31,"endColumn":16},{"ruleId":"57","severity":1,"message":"58","line":12,"column":7,"nodeType":"59","messageId":"60","endLine":12,"endColumn":16},{"ruleId":"61","replacedBy":"62"},{"ruleId":"63","replacedBy":"64"},{"ruleId":"61","replacedBy":"65"},{"ruleId":"63","replacedBy":"66"},{"ruleId":"57","severity":1,"message":"67","line":1,"column":17,"nodeType":"59","messageId":"60","endLine":1,"endColumn":23},{"ruleId":"57","severity":1,"message":"68","line":1,"column":25,"nodeType":"59","messageId":"60","endLine":1,"endColumn":33},{"ruleId":"57","severity":1,"message":"69","line":9,"column":10,"nodeType":"59","messageId":"60","endLine":9,"endColumn":22},{"ruleId":"57","severity":1,"message":"70","line":10,"column":10,"nodeType":"59","messageId":"60","endLine":10,"endColumn":27},{"ruleId":"57","severity":1,"message":"68","line":4,"column":16,"nodeType":"59","messageId":"60","endLine":4,"endColumn":24},{"ruleId":"57","severity":1,"message":"67","line":4,"column":26,"nodeType":"59","messageId":"60","endLine":4,"endColumn":32},{"ruleId":"57","severity":1,"message":"71","line":23,"column":10,"nodeType":"59","messageId":"60","endLine":23,"endColumn":22},"no-unused-vars","'analytics' is assigned a value but never used.","Identifier","unusedVar","no-native-reassign",["72"],"no-negated-in-lhs",["73"],["72"],["73"],"'useRef' is defined but never used.","'useState' is defined but never used.","'useAuthState' is defined but never used.","'useCollectionData' is defined but never used.","'Messageinput' is defined but never used.","no-global-assign","no-unsafe-negation"]
30 changes: 15 additions & 15 deletions app/.firebase/hosting.YnVpbGQ.cache
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
asset-manifest.json,1609169392319,4c6081faa73613017b23cf00b5289d01e3a9ecf6de63554fc90be399889baa05
404.html,1609162034544,daa499dd96d8229e73235345702ba32f0793f0c8e5c0d30e40e37a5872be57aa
manifest.json,1606514346749,aff3449bdc238776f5d6d967f19ec491b36aed5fb7f23ccff6500736fd58494a
robots.txt,1606514346749,bfe106a3fb878dc83461c86818bf74fc1bdc7f28538ba613cd3e775516ce8b49
static/css/main.ab7136cd.chunk.css,1609169392381,01a3c91f4251e1c9180041ca7646a9c72ecc4e61fb1d738702d783a127078cf3
static/css/main.ab7136cd.chunk.css.map,1609169392682,dc1e88e09c0e717757b1d13e201ac00e081a69962b601cbeac1b094d93562828
index.html,1609169392337,93592d20e2e046a454f3fbeefea791233da21928177edd3dfcb23bb4b70b6c05
static/js/2.a599d2a2.chunk.js.LICENSE.txt,1609169422389,9756a89cbc3d202f2f760e2a0ad3c2e300099c967661c682eaa7e07103367f29
favicon.ico,1606514346749,eae62e993eb980ec8a25058c39d5a51feab118bd2100c4deebb2a9c158ec11f9
static/js/3.1b09c562.chunk.js.map,1609169392719,cda2d9ec448b0e0af0254d41be52e8da0461b8fc32291ba5d51866f3cc790a9b
logo192.png,1606514346749,3ee59515172ee198f3be375979df15ac5345183e656720a381b8872b2a39dc8b
static/js/main.a0d2a269.chunk.js.map,1609169392725,da4a7a59da0813cd6a694e1633d1a747a6cfad94922ea2fbd30d61bd6e432854
logo512.png,1606514346749,ee7e2f3fdb8209c4b6fd7bef6ba50d1b9dba30a25bb5c3126df057e1cb6f5331
static/js/runtime-main.3aaedb4a.js.map,1609169392716,84ca9d9d7ec0697558316c4623399c5e8642280985bf35e004245977dd951d29
static/js/runtime-main.3aaedb4a.js,1609169392627,33e0372d4fe26c197af73c7f96f8bba3e2655142a0877144ad55cdda968abafa
static/js/3.1b09c562.chunk.js,1609169392682,47cd0be53e0aac38188a2c09548c53ef7f7f21d3c92b594e8683d8ac98d6e51d
static/js/main.a0d2a269.chunk.js,1609169392721,2bdffd49bedb3e5a32c5f17deca60439ed99d1eac80d519424dff4c20c209756
static/js/2.a599d2a2.chunk.js,1609169392682,d0a555a7169d0b3e83d31fb789ccb5b81eb7eaa48a7d87ea6d6b6f42c8790aca
static/js/2.a599d2a2.chunk.js.map,1609169392721,f0f621a60a78715358566e0a39a343b1d0085e9201c815f3a4143ef92d876894
manifest.json,1606514346749,aff3449bdc238776f5d6d967f19ec491b36aed5fb7f23ccff6500736fd58494a
robots.txt,1606514346749,bfe106a3fb878dc83461c86818bf74fc1bdc7f28538ba613cd3e775516ce8b49
asset-manifest.json,1609331385525,a7019404b5ecd67c4a13531acb074862e388d03a52d75887f0348fbf022e1613
index.html,1609331385526,4940a236b6492eeb1946f0c776fd56c1f2126311bc90aa991bcf732857c07f6a
static/css/main.21b1ff40.chunk.css,1609331386031,12563c2f7cb3e5f22541690148d69002e24262cd68c27357731703e610b28c1f
static/css/main.21b1ff40.chunk.css.map,1609331386112,8895dae35744ffcb6afcc190b1649c1bcd4566d4b14aea8b19b37832bd1be0c4
static/js/2.8ee288d6.chunk.js.LICENSE.txt,1609331386115,f6b73f27559990f6885679c9a53d5fe7de5cc7da07874d783d1bd7b820fb77c5
static/js/3.f5a421bb.chunk.js,1609331386098,c5df29ae594a885cc6c07446a3884035b5ab1387cc947d75699352f3feb8a39f
static/js/3.f5a421bb.chunk.js.map,1609331386031,47375c0dd88524a9e9a624420c339dbd91e8b9ad173557a0e5baf8cb7ae9d8db
static/js/main.95aafafa.chunk.js,1609331386130,ad4b36d7f09a80b2da6160fe8d6c5075e938170cbe712fe5831c38236cc5dd10
static/js/main.95aafafa.chunk.js.map,1609331386126,78d8695de2cde356c07e2ce48d66d6de3f7b84dbe3199f0cb14a1eb1c084e2c3
static/js/runtime-main.84880993.js,1609331386031,b8a870fcfde36515bd65c76338329344856733a39f69ba2c5a3f5682da88ef9b
static/js/runtime-main.84880993.js.map,1609331386099,6aea65712261d8d3731ba8a37acc781e32583d0572d9015372e3fc702c34b584
static/js/2.8ee288d6.chunk.js,1609331385675,e5397848e18cadbeb29f35c4685338a4c7748e728182490bac0f182bf7f72a33
static/js/2.8ee288d6.chunk.js.map,1609331386126,66717a021047ab4cfe13523d1ad485ba6c1c48a4fa38043f1af1d1d1311fdcd9
5 changes: 4 additions & 1 deletion app/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
{
"name": "app",
"version": "0.1.0",
"version": "0.0.1-beta-3",
"private": true,
"dependencies": {
"@material-ui/core": "^4.11.2",
"@material-ui/icons": "^4.11.2",
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.1.0",
"@testing-library/user-event": "^12.1.10",
"antd": "^4.10.0",
"firebase": "^8.2.1",
"react": "^17.0.1",
"react-dom": "^17.0.1",
Expand Down
55 changes: 25 additions & 30 deletions app/src/App.css
Original file line number Diff line number Diff line change
@@ -1,38 +1,33 @@
.App {
text-align: center;
}
@import '~antd/dist/antd.css';

.App-logo {
height: 40vmin;
pointer-events: none;
body {
background-color: #ffffff;
text-align: left;
}

@media (prefers-reduced-motion: no-preference) {
.App-logo {
animation: App-logo-spin infinite 20s linear;

/*Form {
height: 6vh;
position: fixed;
bottom: 0;
background-color: #fff;
width: 60%;
max-width: 728px;
font-size: 1.5rem;
float: left;
}
}
form Button {
border-radius: 50%;
.App-header {
background-color: #282c34;
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: calc(10px + 2vmin);
color: white;
}
.App-link {
color: #61dafb;
}*/

img {
border-radius: 20%;

}

@keyframes App-logo-spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
.MuiButton-root {
border-radius: 8px;
}

Loading

0 comments on commit b8eeb31

Please sign in to comment.