Refactor ExtraSidebar component

This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-03-30 17:58:11 -03:00
commit 1510f55efe

View file

@ -276,21 +276,18 @@ export default function ExtraSidebar(): JSX.Element {
>
<IconComponent
name={search ? "X" : "Search"}
className={`h-5 w-5 stroke-[1.5] text-primary ${search ? "cursor-pointer" : "cursor-default"
}`}
className={`h-5 w-5 stroke-[1.5] text-primary ${
search ? "cursor-pointer" : "cursor-default"
}`}
aria-hidden="true"
/>
</div>
</div>
<Separator />
<div className="side-bar-components-div-arrangement">
<div
className="parent-disclosure-arrangement"
>
<div className="flex gap-4 items-center align-middle">
<span className="parent-disclosure-title">
Core Components
</span>
<div className="parent-disclosure-arrangement">
<div className="flex items-center gap-4 align-middle">
<span className="parent-disclosure-title">Core Components</span>
</div>
</div>
{Object.keys(dataFilter)
@ -351,7 +348,7 @@ export default function ExtraSidebar(): JSX.Element {
}
official={
dataFilter[SBSectionName][SBItemName].official ===
false
false
? false
: true
}
@ -443,33 +440,33 @@ export default function ExtraSidebar(): JSX.Element {
</DisclosureComponent>
{index ===
Object.keys(dataFilter).length -
PRIORITY_SIDEBAR_ORDER.length +
1 && (
<>
<a
target={"_blank"}
href="https://langflow.store"
className="components-disclosure-arrangement"
>
<div className="flex gap-4 pl-2">
{/* BUG ON THIS ICON */}
<SparklesIcon
strokeWidth={1.5}
className="w-[22px] text-primary"
/>
PRIORITY_SIDEBAR_ORDER.length +
1 && (
<>
<a
target={"_blank"}
href="https://langflow.store"
className="components-disclosure-arrangement"
>
<div className="flex gap-4 pl-2">
{/* BUG ON THIS ICON */}
<SparklesIcon
strokeWidth={1.5}
className="w-[22px] text-primary"
/>
<span className="components-disclosure-title">
Discover More
</span>
<span className="components-disclosure-title">
Discover More
</span>
</div>
<div className="components-disclosure-div">
<div>
<LinkIcon className="h-4 w-4 text-foreground" />
</div>
<div className="components-disclosure-div">
<div>
<LinkIcon className="h-4 w-4 text-foreground" />
</div>
</div>
</a>
</>
)}
</div>
</a>
</>
)}
</>
) : (
<div key={index}></div>