diff --git a/components/Layouts/SiteLayout.js b/components/Layouts/SiteLayout.js
new file mode 100644
index 0000000..30e923b
--- /dev/null
+++ b/components/Layouts/SiteLayout.js
@@ -0,0 +1,35 @@
+
+import Head from "next/head"
+
+export default function Layout({ children }) {
+ return (
+ <>
+
+
+ nirvana
+
+
+ {/* Google Fonts */}
+
+
+
+
+
+
+
+
+ {children}
+
+ >
+ )
+}
\ No newline at end of file
diff --git a/contexts/authContext.js b/contexts/authContext.js
index 1068fbf..9217983 100644
--- a/contexts/authContext.js
+++ b/contexts/authContext.js
@@ -1,6 +1,6 @@
import { getAuth, GoogleAuthProvider, onAuthStateChanged, signInWithPopup, signOut, User } from "firebase/auth";
import React, { useContext, useEffect, useState } from "react";
-import firebase from '../services/firebase'
+import firebase from '../services/firebaseService'
const AuthContext = React.createContext(null);
const googleProvider = new GoogleAuthProvider()
diff --git a/pages/_app.js b/pages/_app.js
index faf4704..765210b 100644
--- a/pages/_app.js
+++ b/pages/_app.js
@@ -2,42 +2,16 @@ import '../styles/globals.css'
import 'antd/dist/antd.css';
import Head from 'next/head'
import { AuthProvider } from '../contexts/authContext'
+import SiteLayout from '../components/Layouts/SiteLayout'
function MyApp({ Component, pageProps }) {
- return <>
-
-
-
-
- nirvana
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- >
+ return (
+
+
+
+
+
+ )
}
export default MyApp
diff --git a/pages/index.js b/pages/index.js
index c2547a7..c9a10ef 100644
--- a/pages/index.js
+++ b/pages/index.js
@@ -1,6 +1,5 @@
import Head from 'next/head';
import Image from 'next/image';
-import styles from '../styles/Home.module.css';
export default function Home() {
return (
@@ -12,7 +11,7 @@ export default function Home() {
tired of the rat race on{' '}
- insta, tiktok, snap, "meta"...?
+ insta, tiktok, snap, "meta"...?
diff --git a/pages/teams/dashboard.tsx b/pages/teams/dashboard.tsx
index 8d12cbf..adc66c4 100644
--- a/pages/teams/dashboard.tsx
+++ b/pages/teams/dashboard.tsx
@@ -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() {
-
{/* list of team members */}
{
testFriends.map((friend, i) => {
diff --git a/pages/teams/index.js b/pages/teams/index.js
index c5fe90a..d5d061e 100644
--- a/pages/teams/index.js
+++ b/pages/teams/index.js
@@ -1,81 +1,30 @@
-import Head from 'next/head';
-import Image from 'next/image';
-import styles from '/styles/Home.module.css';
-import Link from 'next/link';
+import { useAuth } from "../../contexts/authContext"
+import { useRouter } from "next/router"
+import { useEffect } from "react"
+
+/**
+ * figure out where to take the user based on everything
+ */
+function RouteHandler() {
+ 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])
-export default function Home() {
return (
-
-
-
-
- nirvana for teams
-
-
-
-
-
-
-
-
-
-
-
-
nirvana
-
-
๐voice first collaboration for remote teams
-
-
- tired of spending most of the work day on{' '}
- slack, zoom, ms teams, trello, outlook, gcal, notion, gmail...?
-
-
-
- focus on actually working and:
-
- - cut the texting, emojis, and notifications
-
- - increase collaboration without endless threads
-
- - avoid 80% of meetings with asynchronous and spontaneous convos
-
- - form better relationships with your team
-
-
-
-
- wanna test the beta? text us @ 949.237.2715
-
-
- {/* */}
-
-
- why? we live in a distracted world. let's fix it, because less is more.
-
-
-
-
-
-
-
- );
+
this is the route handler page
+ )
}
+
+export async function getServerSideProps() {
+ // Pass data to the page via props
+ return { props: { } }
+}
+
+export default RouteHandler
diff --git a/pages/teams/landing.js b/pages/teams/landing.js
new file mode 100644
index 0000000..4aaa56a
--- /dev/null
+++ b/pages/teams/landing.js
@@ -0,0 +1,80 @@
+import Head from 'next/head';
+import Image from 'next/image';
+import Link from 'next/link';
+
+export default function Landing() {
+ return (
+
+
+
+
+ nirvana for teams
+
+
+
+
+
+
+
+
+
+
+
+
nirvana
+
+
๐voice first collaboration for remote teams
+
+
+ tired of spending most of the work day on{' '}
+ slack, zoom, ms teams, trello, outlook, gcal, notion, gmail...?
+
+
+
+ focus on actually working and:
+
+ - cut the texting, emojis, and notifications
+
+ - increase collaboration without endless threads
+
+ - avoid 80% of meetings with asynchronous and spontaneous convos
+
+ - form better relationships with your team
+
+
+
+
+ wanna test the beta? text us @ 949.237.2715
+
+
+ {/* */}
+
+
+ why? we live in a distracted world. let's fix it, because less is more.
+