Update index.js
This commit is contained in:
+30
-12
@@ -17,8 +17,11 @@ import { Divider } from "antd";
|
|||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import SkeletonLoader from "../components/Loading/skeletonLoader";
|
import SkeletonLoader from "../components/Loading/skeletonLoader";
|
||||||
|
import { useAuth } from "../contexts/authContext";
|
||||||
|
|
||||||
export default function Home() {
|
export default function Home() {
|
||||||
|
const { currUser } = useAuth();
|
||||||
|
|
||||||
const handleGetDemo = () => {
|
const handleGetDemo = () => {
|
||||||
window.open("https://calendly.com/usenirvana/30min", "_blank");
|
window.open("https://calendly.com/usenirvana/30min", "_blank");
|
||||||
};
|
};
|
||||||
@@ -59,19 +62,34 @@ export default function Home() {
|
|||||||
<span className="text-gray-500 border-r-gray-400 border-r-2 pr-5">
|
<span className="text-gray-500 border-r-gray-400 border-r-2 pr-5">
|
||||||
Philosophy
|
Philosophy
|
||||||
</span> */}
|
</span> */}
|
||||||
<button
|
|
||||||
onClick={handleLogin}
|
|
||||||
className="ml-auto text-gray-500 hidden md:block"
|
|
||||||
>
|
|
||||||
Log In
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<button
|
{currUser ? (
|
||||||
onClick={handleLogin}
|
<>
|
||||||
className="rounded font-semibold bg-gray-200 p-2 text-teal-600 shadow-lg flex flex-row items-center space-x-2"
|
<span className="text-gray-500">Welcome back,</span>
|
||||||
>
|
<button
|
||||||
<span>Sign Up</span>
|
onClick={() => window.open("/teams", "_self")}
|
||||||
</button>
|
className="rounded font-semibold bg-gray-200 p-2 text-teal-600 shadow-lg flex flex-row items-center space-x-2"
|
||||||
|
>
|
||||||
|
Continue
|
||||||
|
</button>
|
||||||
|
</>
|
||||||
|
) : (
|
||||||
|
<>
|
||||||
|
<button
|
||||||
|
onClick={handleLogin}
|
||||||
|
className="ml-auto text-gray-500 hidden md:block"
|
||||||
|
>
|
||||||
|
Log In
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<button
|
||||||
|
onClick={handleLogin}
|
||||||
|
className="rounded font-semibold bg-gray-200 p-2 text-teal-600 shadow-lg flex flex-row items-center space-x-2"
|
||||||
|
>
|
||||||
|
<span>Sign Up</span>
|
||||||
|
</button>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
|
||||||
{getStartedButton}
|
{getStartedButton}
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
Reference in New Issue
Block a user