Skip to content

Commit

Permalink
Firebase conflict reosulutions (#179)
Browse files Browse the repository at this point in the history
* Made error case for email in use display correctly in front end

* Made error case for email in use display correctly in front end (#158)

* Cleaned up useEffect function #159

* Added testing pipeline (#175)

* Create main.yml

* Update main.yml

* Update _layout.tsx

* Update main.yml

* Update socketio.test.ts

* Update socketio.test.ts

* Update _layout.tsx

* User Context and User Type created and wrapped chat screen (#131)

* added user context

* Added userID and displayName

* moved user and display name generation into UserProvider

* Improved UserContext implementation

Amongst these changes, the user type on the frontend has been edited in order
to prevent hidden functions that would pull information into the UserContext
from other contexts. The message type was also modified to keep a new author
section with a displayName attribute. An issue should be created for a socket
API endpoint for grabbing the displayName, and one to set it in a connectedUser
document in the databse.

* updated package lock

---------

Co-authored-by: h1divp <[email protected]>

---------

Co-authored-by: Phantom0110 <[email protected]>
Co-authored-by: Mohammed Ali <[email protected]>
Co-authored-by: AaronGibson2 <[email protected]>
Co-authored-by: h1divp <[email protected]>
  • Loading branch information
5 people authored Feb 25, 2024
1 parent 9263c96 commit a0d3440
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion client/src/contexts/SocketContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ export const SocketProvider = ({ children }: { children: React.ReactNode }) => {
setMounted(true);
}


if (!mounted) {
initializeSocket();
}

return () => {
console.log("[LOG]: Cleaning up intializeSocket useEffect");
};
Expand Down
4 changes: 2 additions & 2 deletions client/src/services/store.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { User, createUserWithEmailAndPassword, onAuthStateChanged, signInWithEmailAndPassword, signOut } from 'firebase/auth'
import { Store } from 'pullstate'
import { auth, app } from '../configs/firebaseConfig'


import { FirebaseError } from 'firebase/app';
import { useUser } from '../contexts/UserContext';

interface AuthStoreInterface {
isLoggedin: boolean,
Expand Down

0 comments on commit a0d3440

Please sign in to comment.