getting set up for the main view of create team or ask manager
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { useAuth } from "../../contexts/authContext"
|
||||
import { useRouter } from "next/router"
|
||||
import { useEffect } from "react"
|
||||
import { useEffect, useState } from "react"
|
||||
import UserService from '../../services/userService'
|
||||
import { User } from "../../models/user"
|
||||
import { GetServerSidePropsContext } from "next"
|
||||
@@ -15,6 +15,7 @@ function RouteHandler({ user }) {
|
||||
const { currUser } = useAuth()
|
||||
const router = useRouter()
|
||||
const userService: UserService = new UserService()
|
||||
const [loading, setLoading] = useState<Boolean>(false)
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
@@ -35,7 +36,9 @@ function RouteHandler({ user }) {
|
||||
router.push('/teams/profile')
|
||||
}
|
||||
|
||||
// check if user is in a team or has created one
|
||||
// check if user is in a team go to the team dashboard
|
||||
|
||||
|
||||
|
||||
} catch(error) {
|
||||
console.log(error)
|
||||
@@ -44,6 +47,10 @@ function RouteHandler({ user }) {
|
||||
})();
|
||||
}, [currUser])
|
||||
|
||||
if (loading) {
|
||||
return <div>figuring out where you should go</div>
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="text-black">this is the route handler page</div>
|
||||
)
|
||||
|
||||
@@ -5,11 +5,7 @@ import { User } from '../models/user'
|
||||
export default class UserService {
|
||||
private db : Firestore = getFirestore()
|
||||
private static collectionName: string = "users"
|
||||
|
||||
constructor() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
// give back the avatar based on the person's google account avatar
|
||||
getUserAvatar(displayName: string) {
|
||||
return `https://ui-avatars.com/api/?name=${displayName}`
|
||||
|
||||
Reference in New Issue
Block a user