🔨 refactor(headerComponent/index.tsx): simplify header component by removing unnecessary conditional rendering and adding sign out button

This commit is contained in:
Cristhian Zanforlin Lousa 2023-08-14 18:45:09 -03:00
commit e124b216d7

View file

@ -34,23 +34,19 @@ export default function Header() {
return (
<div className="header-arrangement">
<div className="header-start-display">
{tabId === "" || !tabId ? (
<div className="ml-2">
<a
href="https://www.langflow.org/"
target="_blank"
rel="noreferrer"
className="header-waitlist-link-box"
>
<span className="pr-1 text-2xl">⛓️</span>
<span>Join The Waitlist</span>
</a>
</div>
) : (
<Link to="/">
<span className="ml-4 text-2xl">⛓️</span>
</Link>
)}
<Link to="/">
<span className="ml-4 text-2xl">⛓️</span>
</Link>
<Button
onClick={() => {
logout();
navigate("/login");
}}
variant="outline"
className=""
>
Sign out
</Button>
{flows.findIndex((f) => tabId === f.id) !== -1 && tabId !== "" && (
<MenuBar flows={flows} tabId={tabId} />