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