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 -34
View File
@@ -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 <>
<Head>
<meta name="description" content="Generated by create next app" />
<meta charSet="UTF-8" />
<title>nirvana</title>
<link rel="icon" href="/icon.png" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link
rel="preconnect"
href="https://fonts.gstatic.com"
crossOrigin="true"
/>
<link
href="https://fonts.googleapis.com/css2?family=Satisfy&display=swap"
rel="stylesheet"
/>
<link
href="https://fonts.googleapis.com/css2?family=Baloo+Bhaijaan+2&display=swap"
rel="stylesheet"
/>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Poppins:300,400,500,600,700" />
</Head>
<main>
<AuthProvider>
<Component {...pageProps} />
</AuthProvider>
</main>
</>
return (
<SiteLayout>
<AuthProvider>
<Component {...pageProps} />
</AuthProvider>
</SiteLayout>
)
}
export default MyApp
+1 -2
View File
@@ -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() {
<p>
tired of the rat race on{' '}
<font className='text-gray-300'>insta, tiktok, snap, &quot;meta&quot;...</font>?
<font className='text-gray-500'>insta, tiktok, snap, &quot;meta&quot;...</font>?
</p>
<p>
+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) => {
+27 -78
View File
@@ -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 (
<div className={styles.container}>
<Head>
<meta charSet="UTF-8" />
<title>nirvana for teams</title>
<link rel="icon" href="/icon.png" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link
rel="preconnect"
href="https://fonts.gstatic.com"
crossOrigin="true"
/>
<link
href="https://fonts.googleapis.com/css2?family=Satisfy&display=swap"
rel="stylesheet"
/>
<link
href="https://fonts.googleapis.com/css2?family=Baloo+Bhaijaan+2&display=swap"
rel="stylesheet"
/>
</Head>
<main className="space-y-10">
<p id="main-title">nirvana</p>
<p>🍃voice first collaboration for remote teams</p>
<p>
tired of spending most of the work day on{' '}
<font className="text-gray-300 text-3xl">slack, <font className="text-2xl">zoom,</font> <font className="text-xl">ms teams,</font> <font className="text-lg">trello,</font> <font className="text-base">outlook,</font> <font className="text-base">gcal, </font><font className="text-sm">notion,</font> <font className="text-xs">gmail...</font>?</font>
</p>
<p>
focus on actually working and:
<br />
- cut the texting, emojis, and notifications
<br />
- increase collaboration without endless threads
<br />
- avoid 80% of meetings with asynchronous and spontaneous convos
<br />
- form better relationships with your team
<br />
</p>
<p>
wanna test the beta? text us @ <font className="text-gray-300">949.237.2715</font>
</p>
{/* <marquee
direction="left"
width="100%"
height="100%"
behavior="scroll"
scrollamount="12"
offset="0%"
>
<p id="marquee-text">waitlist currently sitting at 2,324 people...</p>
</marquee> */}
<p id="side-note">
why? we live in a distracted world. let&apos;s fix it, because less is more.
</p>
<Link exact href='/teams/login' className='text-3xl text-white'>
<button className='mt-10 text-sm text-emerald-500 font-semibold py-1 px-4 bg-gray-200 rounded'>👋 Login</button>
</Link>
</main>
</div>
);
<div className="text-white">this is the route handler page</div>
)
}
export async function getServerSideProps() {
// Pass data to the page via props
return { props: { } }
}
export default RouteHandler
+80
View File
@@ -0,0 +1,80 @@
import Head from 'next/head';
import Image from 'next/image';
import Link from 'next/link';
export default function Landing() {
return (
<div className='container m-20'>
<Head>
<meta charSet="UTF-8" />
<title>nirvana for teams</title>
<link rel="icon" href="/icon.png" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link
rel="preconnect"
href="https://fonts.gstatic.com"
crossOrigin="true"
/>
<link
href="https://fonts.googleapis.com/css2?family=Satisfy&display=swap"
rel="stylesheet"
/>
<link
href="https://fonts.googleapis.com/css2?family=Baloo+Bhaijaan+2&display=swap"
rel="stylesheet"
/>
</Head>
<main className="space-y-10">
<p id="main-title">nirvana</p>
<p>🍃voice first collaboration for remote teams</p>
<p>
tired of spending most of the work day on{' '}
<font className="text-gray-300 text-3xl">slack, <font className="text-2xl">zoom,</font> <font className="text-xl">ms teams,</font> <font className="text-lg">trello,</font> <font className="text-base">outlook,</font> <font className="text-base">gcal, </font><font className="text-sm">notion,</font> <font className="text-xs">gmail...</font>?</font>
</p>
<p>
focus on actually working and:
<br />
- cut the texting, emojis, and notifications
<br />
- increase collaboration without endless threads
<br />
- avoid 80% of meetings with asynchronous and spontaneous convos
<br />
- form better relationships with your team
<br />
</p>
<p>
wanna test the beta? text us @ <font className="text-gray-300">949.237.2715</font>
</p>
{/* <marquee
direction="left"
width="100%"
height="100%"
behavior="scroll"
scrollamount="12"
offset="0%"
>
<p id="marquee-text">waitlist currently sitting at 2,324 people...</p>
</marquee> */}
<p id="side-note">
why? we live in a distracted world. let&apos;s fix it, because less is more.
</p>
<Link exact href='/teams/login' className='text-3xl text-white'>
<button className='mt-10 text-sm text-emerald-500 font-semibold py-1 px-4 bg-gray-200 rounded'>👋 Login</button>
</Link>
</main>
</div>
);
}
+2 -2
View File
@@ -10,8 +10,8 @@ export default function Login() {
useEffect(() => {
// if auth, go to dashboard
if (currUser) {
console.log('already logged in, redirecting to the dashboard')
router.push('/teams/dashboard')
console.log('already logged in, redirecting to router')
router.push('/teams')
}
}, [currUser])