♻️ (index.tsx): remove unnecessary trailing commas to improve code readability

🐛 (index.tsx): fix conditional rendering of Download option in toolbar
 (ProfilePictureForm): add setLoading(false) after updating state to ensure loading state is reset
This commit is contained in:
cristhianzl 2024-06-12 19:43:41 -03:00
commit 45963ffce0
2 changed files with 16 additions and 12 deletions

View file

@ -625,7 +625,7 @@ export default function NodeToolbarComponent({
/>
</SelectItem>
)}
{(!hasStore || !hasApiKey || !validApiKey) && (
{/* {(!hasStore || !hasApiKey || !validApiKey) && (
<SelectItem value={"Download"}>
<ToolbarSelectItem
shortcut={
@ -637,7 +637,7 @@ export default function NodeToolbarComponent({
dataTestId="Download-button-modal"
/>
</SelectItem>
)}
)} */}
<SelectItem
value={"documentation"}
disabled={data.node?.documentation === ""}
@ -687,16 +687,19 @@ export default function NodeToolbarComponent({
style={`${frozen ? " text-ice" : ""} transition-all`}
/>
</SelectItem>
<SelectItem value="Download">
<ToolbarSelectItem
shortcut={
shortcuts.find((obj) => obj.name === "Download")?.shortcut!
}
value={"Download"}
icon={"Download"}
dataTestId="download-button-modal"
/>
</SelectItem>
{(!hasStore || !hasApiKey || !validApiKey) && (
<SelectItem value="Download">
<ToolbarSelectItem
shortcut={
shortcuts.find((obj) => obj.name === "Download")
?.shortcut!
}
value={"Download"}
icon={"Download"}
dataTestId="download-button-modal"
/>
</SelectItem>
)}
<SelectItem
value={"delete"}
className="focus:bg-red-400/[.20]"

View file

@ -45,6 +45,7 @@ const ProfilePictureFormComponent = ({
} else {
prev[folder] = [path];
}
setLoading(false);
return prev;
});
});