refactor(v4.0.0-alpha): beginning of a new era

This commit is contained in:
Amruth Pillai
2023-11-05 12:31:42 +01:00
parent 0ba6a444e2
commit 22933bd412
505 changed files with 81829 additions and 0 deletions

View File

@ -0,0 +1,46 @@
import { Book, SignOut } from "@phosphor-icons/react";
import { Button } from "@reactive-resume/ui";
import { Link } from "react-router-dom";
import { useLogout } from "@/client/services/auth";
import { useAuthStore } from "@/client/stores/auth";
export const HeroCTA = () => {
const { logout } = useLogout();
const isLoggedIn = useAuthStore((state) => !!state.user);
if (isLoggedIn) {
return (
<>
<Button asChild size="lg">
<Link to="/dashboard">Go to Dashboard</Link>
</Button>
<Button size="lg" variant="link" onClick={() => logout()}>
<SignOut className="mr-3" />
Logout
</Button>
</>
);
}
if (!isLoggedIn) {
return (
<>
<Button asChild size="lg">
<Link to="/auth/login">Get started</Link>
</Button>
<Button asChild size="lg" variant="link">
<a href="https://docs.rxresu.me" target="_blank" rel="noopener noreferrer nofollow">
<Book className="mr-3" />
Learn more
</a>
</Button>
</>
);
}
return null;
};