cleaning things up

This commit is contained in:
Arjun Patel
2022-01-13 18:12:43 -08:00
parent 6ac73c8c13
commit 9a945edd87
13 changed files with 186 additions and 247 deletions
+8 -9
View File
@@ -75,18 +75,18 @@ export default function Dashboard() {
const { currUser, logOut } = useAuth()
const router = useRouter()
useEffect(() => {
// if not authenticated, take user to the login
if (!currUser) {
console.log('not authenticated...routing from dashboard to teams home')
router.push('/teams/login')
}
}, [currUser])
const [selectedChannel, setSelectedChannel] = useState(null)
console.log("in dashboard " + currUser)
useEffect(() => {
// if not authed, go to home
if (!currUser) {
console.log('not authenticated...routing from dashboard to teams home')
router.push('/teams')
}
}, [currUser])
async function handleSignOut() {
console.log("clicked log out button")
@@ -218,7 +218,6 @@ export default function Dashboard() {
</button>
</span>
{/* list of team members */}
{
testFriends.map((friend, i) => {