♻️ (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:
parent
32f67f8dba
commit
45963ffce0
2 changed files with 16 additions and 12 deletions
|
|
@ -625,7 +625,7 @@ export default function NodeToolbarComponent({
|
||||||
/>
|
/>
|
||||||
</SelectItem>
|
</SelectItem>
|
||||||
)}
|
)}
|
||||||
{(!hasStore || !hasApiKey || !validApiKey) && (
|
{/* {(!hasStore || !hasApiKey || !validApiKey) && (
|
||||||
<SelectItem value={"Download"}>
|
<SelectItem value={"Download"}>
|
||||||
<ToolbarSelectItem
|
<ToolbarSelectItem
|
||||||
shortcut={
|
shortcut={
|
||||||
|
|
@ -637,7 +637,7 @@ export default function NodeToolbarComponent({
|
||||||
dataTestId="Download-button-modal"
|
dataTestId="Download-button-modal"
|
||||||
/>
|
/>
|
||||||
</SelectItem>
|
</SelectItem>
|
||||||
)}
|
)} */}
|
||||||
<SelectItem
|
<SelectItem
|
||||||
value={"documentation"}
|
value={"documentation"}
|
||||||
disabled={data.node?.documentation === ""}
|
disabled={data.node?.documentation === ""}
|
||||||
|
|
@ -687,16 +687,19 @@ export default function NodeToolbarComponent({
|
||||||
style={`${frozen ? " text-ice" : ""} transition-all`}
|
style={`${frozen ? " text-ice" : ""} transition-all`}
|
||||||
/>
|
/>
|
||||||
</SelectItem>
|
</SelectItem>
|
||||||
|
{(!hasStore || !hasApiKey || !validApiKey) && (
|
||||||
<SelectItem value="Download">
|
<SelectItem value="Download">
|
||||||
<ToolbarSelectItem
|
<ToolbarSelectItem
|
||||||
shortcut={
|
shortcut={
|
||||||
shortcuts.find((obj) => obj.name === "Download")?.shortcut!
|
shortcuts.find((obj) => obj.name === "Download")
|
||||||
|
?.shortcut!
|
||||||
}
|
}
|
||||||
value={"Download"}
|
value={"Download"}
|
||||||
icon={"Download"}
|
icon={"Download"}
|
||||||
dataTestId="download-button-modal"
|
dataTestId="download-button-modal"
|
||||||
/>
|
/>
|
||||||
</SelectItem>
|
</SelectItem>
|
||||||
|
)}
|
||||||
<SelectItem
|
<SelectItem
|
||||||
value={"delete"}
|
value={"delete"}
|
||||||
className="focus:bg-red-400/[.20]"
|
className="focus:bg-red-400/[.20]"
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,7 @@ const ProfilePictureFormComponent = ({
|
||||||
} else {
|
} else {
|
||||||
prev[folder] = [path];
|
prev[folder] = [path];
|
||||||
}
|
}
|
||||||
|
setLoading(false);
|
||||||
return prev;
|
return prev;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue