cleaning things up
This commit is contained in:
@@ -0,0 +1,35 @@
|
|||||||
|
|
||||||
|
import Head from "next/head"
|
||||||
|
|
||||||
|
export default function Layout({ children }) {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Head>
|
||||||
|
<meta charSet="UTF-8" />
|
||||||
|
<title>nirvana</title>
|
||||||
|
<link rel="icon" href="/icon.png" />
|
||||||
|
|
||||||
|
{/* Google Fonts */}
|
||||||
|
<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>
|
||||||
|
{children}
|
||||||
|
</main>
|
||||||
|
</>
|
||||||
|
)
|
||||||
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
import { getAuth, GoogleAuthProvider, onAuthStateChanged, signInWithPopup, signOut, User } from "firebase/auth";
|
import { getAuth, GoogleAuthProvider, onAuthStateChanged, signInWithPopup, signOut, User } from "firebase/auth";
|
||||||
import React, { useContext, useEffect, useState } from "react";
|
import React, { useContext, useEffect, useState } from "react";
|
||||||
import firebase from '../services/firebase'
|
import firebase from '../services/firebaseService'
|
||||||
|
|
||||||
const AuthContext = React.createContext(null);
|
const AuthContext = React.createContext(null);
|
||||||
const googleProvider = new GoogleAuthProvider()
|
const googleProvider = new GoogleAuthProvider()
|
||||||
|
|||||||
+8
-34
@@ -2,42 +2,16 @@ import '../styles/globals.css'
|
|||||||
import 'antd/dist/antd.css';
|
import 'antd/dist/antd.css';
|
||||||
import Head from 'next/head'
|
import Head from 'next/head'
|
||||||
import { AuthProvider } from '../contexts/authContext'
|
import { AuthProvider } from '../contexts/authContext'
|
||||||
|
import SiteLayout from '../components/Layouts/SiteLayout'
|
||||||
|
|
||||||
function MyApp({ Component, pageProps }) {
|
function MyApp({ Component, pageProps }) {
|
||||||
return <>
|
return (
|
||||||
<Head>
|
<SiteLayout>
|
||||||
<meta name="description" content="Generated by create next app" />
|
<AuthProvider>
|
||||||
<meta charSet="UTF-8" />
|
<Component {...pageProps} />
|
||||||
|
</AuthProvider>
|
||||||
<title>nirvana</title>
|
</SiteLayout>
|
||||||
|
)
|
||||||
<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>
|
|
||||||
</>
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default MyApp
|
export default MyApp
|
||||||
|
|||||||
+1
-2
@@ -1,6 +1,5 @@
|
|||||||
import Head from 'next/head';
|
import Head from 'next/head';
|
||||||
import Image from 'next/image';
|
import Image from 'next/image';
|
||||||
import styles from '../styles/Home.module.css';
|
|
||||||
|
|
||||||
export default function Home() {
|
export default function Home() {
|
||||||
return (
|
return (
|
||||||
@@ -12,7 +11,7 @@ export default function Home() {
|
|||||||
|
|
||||||
<p>
|
<p>
|
||||||
tired of the rat race on{' '}
|
tired of the rat race on{' '}
|
||||||
<font className='text-gray-300'>insta, tiktok, snap, "meta"...</font>?
|
<font className='text-gray-500'>insta, tiktok, snap, "meta"...</font>?
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
|||||||
@@ -75,18 +75,18 @@ export default function Dashboard() {
|
|||||||
const { currUser, logOut } = useAuth()
|
const { currUser, logOut } = useAuth()
|
||||||
const router = useRouter()
|
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)
|
const [selectedChannel, setSelectedChannel] = useState(null)
|
||||||
|
|
||||||
console.log("in dashboard " + currUser)
|
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() {
|
async function handleSignOut() {
|
||||||
console.log("clicked log out button")
|
console.log("clicked log out button")
|
||||||
|
|
||||||
@@ -218,7 +218,6 @@ export default function Dashboard() {
|
|||||||
</button>
|
</button>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
|
|
||||||
{/* list of team members */}
|
{/* list of team members */}
|
||||||
{
|
{
|
||||||
testFriends.map((friend, i) => {
|
testFriends.map((friend, i) => {
|
||||||
|
|||||||
+27
-78
@@ -1,81 +1,30 @@
|
|||||||
import Head from 'next/head';
|
import { useAuth } from "../../contexts/authContext"
|
||||||
import Image from 'next/image';
|
import { useRouter } from "next/router"
|
||||||
import styles from '/styles/Home.module.css';
|
import { useEffect } from "react"
|
||||||
import Link from 'next/link';
|
|
||||||
|
/**
|
||||||
|
* 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 (
|
return (
|
||||||
<div className={styles.container}>
|
<div className="text-white">this is the route handler page</div>
|
||||||
<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'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>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export async function getServerSideProps() {
|
||||||
|
// Pass data to the page via props
|
||||||
|
return { props: { } }
|
||||||
|
}
|
||||||
|
|
||||||
|
export default RouteHandler
|
||||||
|
|||||||
@@ -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'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>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -10,8 +10,8 @@ export default function Login() {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
// if auth, go to dashboard
|
// if auth, go to dashboard
|
||||||
if (currUser) {
|
if (currUser) {
|
||||||
console.log('already logged in, redirecting to the dashboard')
|
console.log('already logged in, redirecting to router')
|
||||||
router.push('/teams/dashboard')
|
router.push('/teams')
|
||||||
}
|
}
|
||||||
}, [currUser])
|
}, [currUser])
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
export function requireAuthentication(gssp) {
|
||||||
|
return async (context) => {
|
||||||
|
const { req, res } = context;
|
||||||
|
const token = req.cookies.userToken;
|
||||||
|
|
||||||
|
if (!token) {
|
||||||
|
// Redirect to login page
|
||||||
|
return {
|
||||||
|
redirect: {
|
||||||
|
destination: '/admin/login',
|
||||||
|
statusCode: 302
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
return await gssp(context); // Continue on to call `getServerSideProps` logic
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
class UserService {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
export {}
|
||||||
@@ -1,116 +0,0 @@
|
|||||||
.container {
|
|
||||||
padding: 0 2rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.main {
|
|
||||||
min-height: 100vh;
|
|
||||||
padding: 4rem 0;
|
|
||||||
flex: 1;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.footer {
|
|
||||||
display: flex;
|
|
||||||
flex: 1;
|
|
||||||
padding: 2rem 0;
|
|
||||||
border-top: 1px solid #eaeaea;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.footer a {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
flex-grow: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.title a {
|
|
||||||
color: #0070f3;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.title a:hover,
|
|
||||||
.title a:focus,
|
|
||||||
.title a:active {
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
|
|
||||||
.title {
|
|
||||||
margin: 0;
|
|
||||||
line-height: 1.15;
|
|
||||||
font-size: 4rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.title,
|
|
||||||
.description {
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.description {
|
|
||||||
margin: 4rem 0;
|
|
||||||
line-height: 1.5;
|
|
||||||
font-size: 1.5rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.code {
|
|
||||||
background: #fafafa;
|
|
||||||
border-radius: 5px;
|
|
||||||
padding: 0.75rem;
|
|
||||||
font-size: 1.1rem;
|
|
||||||
font-family: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono,
|
|
||||||
Bitstream Vera Sans Mono, Courier New, monospace;
|
|
||||||
}
|
|
||||||
|
|
||||||
.grid {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
max-width: 800px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card {
|
|
||||||
margin: 1rem;
|
|
||||||
padding: 1.5rem;
|
|
||||||
text-align: left;
|
|
||||||
color: inherit;
|
|
||||||
text-decoration: none;
|
|
||||||
border: 1px solid #eaeaea;
|
|
||||||
border-radius: 10px;
|
|
||||||
transition: color 0.15s ease, border-color 0.15s ease;
|
|
||||||
max-width: 300px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card:hover,
|
|
||||||
.card:focus,
|
|
||||||
.card:active {
|
|
||||||
color: #0070f3;
|
|
||||||
border-color: #0070f3;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card h2 {
|
|
||||||
margin: 0 0 1rem 0;
|
|
||||||
font-size: 1.5rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card p {
|
|
||||||
margin: 0;
|
|
||||||
font-size: 1.25rem;
|
|
||||||
line-height: 1.5;
|
|
||||||
}
|
|
||||||
|
|
||||||
.logo {
|
|
||||||
height: 1em;
|
|
||||||
margin-left: 0.5rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 600px) {
|
|
||||||
.grid {
|
|
||||||
width: 100%;
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+1
-5
@@ -21,7 +21,7 @@ main {
|
|||||||
font-family: "Poppins", sans-serif;
|
font-family: "Poppins", sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
bg {
|
||||||
background: url("/wallpapers/dark-mountains.jpg") no-repeat center center
|
background: url("/wallpapers/dark-mountains.jpg") no-repeat center center
|
||||||
fixed;
|
fixed;
|
||||||
-webkit-background-size: cover;
|
-webkit-background-size: cover;
|
||||||
@@ -47,20 +47,16 @@ body {
|
|||||||
color: teal;
|
color: teal;
|
||||||
}
|
}
|
||||||
#side-note {
|
#side-note {
|
||||||
font-family: "Baloo Bhaijaan 2", cursive;
|
|
||||||
font-size: 1.5em;
|
font-size: 1.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
p {
|
p {
|
||||||
font-family: "Baloo Bhaijaan 2", cursive;
|
|
||||||
font-size: 2em;
|
font-size: 2em;
|
||||||
color: white;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#marquee-text {
|
#marquee-text {
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
font-size: 1.5em;
|
font-size: 1.5em;
|
||||||
font-family: "Baloo Bhaijaan 2", cursive;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Mobile :320px. */
|
/* Mobile :320px. */
|
||||||
|
|||||||
Reference in New Issue
Block a user