mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-05 01:38:44 +00:00
changes from trello board: - AI stylize in side tab primary colored + icon change to draw attention - AI stylize tab subtext "This helps you test and re-test your scene" - AI stylize tab prompt textarea row reduction to fit as much content as possible without going under the fold on smaller screens - Logout button changed to secondary color from primary so it's not attracting. - Git SHA in help panel text changes - fixes to topbar stylings and spacing
39 lines
1.0 KiB
TypeScript
39 lines
1.0 KiB
TypeScript
import { useContext } from "react";
|
|
import { useSignals } from "@preact/signals-react/runtime";
|
|
|
|
import { AUTH_STATUS, AuthenticationContext } from "~/contexts/Authentication";
|
|
import { Button, ButtonLink } from "~/components";
|
|
import { DialogueInference } from "../DialogueInference";
|
|
import { faRightFromBracket } from "@fortawesome/pro-solid-svg-icons";
|
|
|
|
export const AuthButtons = () => {
|
|
useSignals();
|
|
|
|
const { authState, logout } = useContext(AuthenticationContext);
|
|
const handleLogout = () => {
|
|
if (logout) logout();
|
|
};
|
|
if (authState && authState.authStatus === AUTH_STATUS.LOGGED_IN) {
|
|
return (
|
|
<>
|
|
<DialogueInference />
|
|
<Button
|
|
onClick={handleLogout}
|
|
variant="secondary"
|
|
icon={faRightFromBracket}>
|
|
Logout
|
|
</Button>
|
|
</>
|
|
);
|
|
} else {
|
|
return (
|
|
<>
|
|
<ButtonLink variant="secondary" to="/login">
|
|
Login
|
|
</ButtonLink>
|
|
<ButtonLink to="/signup">Sign Up</ButtonLink>
|
|
</>
|
|
);
|
|
}
|
|
};
|