From 34f8c1f8f06fa844d4fcb045009d96c089cbc1b9 Mon Sep 17 00:00:00 2001 From: ogabrielluiz Date: Mon, 17 Jun 2024 13:01:18 -0300 Subject: [PATCH] Run prettier --- src/frontend/src/App.tsx | 6 +-- .../components/OutputComponent/index.tsx | 24 +++++---- .../tooltipRenderComponent/index.tsx | 2 +- .../helpers/get-class-from-build-status.ts | 2 +- .../hooks/use-check-code-validity.tsx | 2 +- .../hooks/use-fetch-data-on-mount.tsx | 2 +- .../hooks/use-handle-new-value.tsx | 2 +- .../hooks/use-handle-node-class.tsx | 2 +- .../src/CustomNodes/hooks/use-icon-render.tsx | 4 +- .../CustomNodes/hooks/use-icons-status.tsx | 2 +- .../hooks/use-update-node-code.tsx | 4 +- .../src/CustomNodes/utils/get-field-title.tsx | 2 +- .../src/alerts/alertDropDown/index.tsx | 6 +-- .../src/components/ImageViewer/index.tsx | 14 ++--- .../folderAccordionComponent/index.tsx | 2 +- .../components/accordionComponent/index.tsx | 4 +- .../addNewVariableButton.tsx | 6 +-- .../components/dragCardComponent/index.tsx | 4 +- .../src/components/cardComponent/index.tsx | 18 +++---- .../components/cardsWrapComponent/index.tsx | 2 +- .../src/components/chatComponent/index.tsx | 8 +-- .../components/codeAreaComponent/index.tsx | 2 +- .../components/codeTabsComponent/index.tsx | 42 +++++++-------- .../components/csvOutputComponent/index.tsx | 2 +- .../src/components/dictComponent/index.tsx | 2 +- .../components/dropdownComponent/index.tsx | 4 +- .../editFlowSettingsComponent/index.tsx | 2 +- .../src/components/exampleComponent/index.tsx | 2 +- .../components/genericIconComponent/index.tsx | 6 +-- .../components/menuBar/index.tsx | 4 +- .../horizontalScrollFadeComponent/index.tsx | 4 +- .../components/popover/index.tsx | 16 +++--- .../components/popoverObject/index.tsx | 24 ++++----- .../components/inputFileComponent/index.tsx | 4 +- .../components/inputGlobalComponent/index.tsx | 8 +-- .../components/inputListComponent/index.tsx | 2 +- .../components/keypairListComponent/index.tsx | 4 +- .../components/paginatorComponent/index.tsx | 2 +- .../components/sideBarButtons/index.tsx | 2 +- .../hooks/use-on-file-drop.tsx | 10 ++-- .../components/tableNodeCellRender/index.tsx | 6 +-- .../src/components/tableComponent/index.tsx | 10 ++-- .../tagsSelectorComponent/index.tsx | 2 +- src/frontend/src/components/ui/accordion.tsx | 6 +-- src/frontend/src/components/ui/alert.tsx | 2 +- src/frontend/src/components/ui/badge.tsx | 2 +- src/frontend/src/components/ui/card.tsx | 4 +- src/frontend/src/components/ui/checkbox.tsx | 4 +- src/frontend/src/components/ui/combobox.tsx | 2 +- src/frontend/src/components/ui/command.tsx | 10 ++-- .../src/components/ui/custom-accordion.tsx | 4 +- .../components/ui/dialog-with-no-close.tsx | 10 ++-- src/frontend/src/components/ui/dialog.tsx | 10 ++-- .../src/components/ui/dropdown-menu.tsx | 14 ++--- src/frontend/src/components/ui/form.tsx | 8 +-- src/frontend/src/components/ui/input.tsx | 4 +- src/frontend/src/components/ui/label.tsx | 2 +- src/frontend/src/components/ui/menubar.tsx | 24 ++++----- src/frontend/src/components/ui/popover.tsx | 4 +- src/frontend/src/components/ui/progress.tsx | 2 +- .../src/components/ui/rename-label.tsx | 2 +- .../src/components/ui/select-custom.tsx | 6 +-- src/frontend/src/components/ui/select.tsx | 8 +-- src/frontend/src/components/ui/separator.tsx | 6 +-- src/frontend/src/components/ui/switch.tsx | 4 +- src/frontend/src/components/ui/table.tsx | 4 +- src/frontend/src/components/ui/tabs.tsx | 6 +-- src/frontend/src/components/ui/textarea.tsx | 4 +- src/frontend/src/components/ui/toggle.tsx | 2 +- src/frontend/src/components/ui/tooltip.tsx | 4 +- src/frontend/src/contexts/authContext.tsx | 6 +-- src/frontend/src/controllers/API/api.tsx | 10 ++-- .../API/helpers/check-duplicate-requests.ts | 2 +- src/frontend/src/controllers/API/index.ts | 54 +++++++++---------- src/frontend/src/icons/AWS/index.tsx | 2 +- src/frontend/src/icons/AzLogo/index.tsx | 2 +- src/frontend/src/icons/Azure/index.tsx | 2 +- src/frontend/src/icons/Bing/index.tsx | 2 +- .../src/icons/FacebookMessenger/index.tsx | 2 +- src/frontend/src/icons/Groq/index.tsx | 2 +- src/frontend/src/icons/IFixIt/index.tsx | 2 +- src/frontend/src/icons/Meta/index.tsx | 2 +- src/frontend/src/icons/Redis/index.tsx | 2 +- src/frontend/src/icons/Searx/index.tsx | 2 +- src/frontend/src/icons/Share/index.tsx | 2 +- src/frontend/src/icons/Slack/index.tsx | 2 +- src/frontend/src/icons/Streamlit/index.tsx | 2 +- src/frontend/src/icons/Word/index.tsx | 2 +- src/frontend/src/index.tsx | 4 +- .../BundleModal/hooks/submit-folder.tsx | 4 +- .../components/csvSelect/index.tsx | 2 +- .../components/SessionView/hooks/index.tsx | 2 +- .../IOModal/components/SessionView/index.tsx | 2 +- .../components/textAreaWrapper/index.tsx | 6 +-- .../chatInput/hooks/use-drag-and-drop.tsx | 2 +- .../hooks/use-handle-file-change.tsx | 2 +- .../components/chatView/chatInput/index.tsx | 2 +- .../components/chatView/chatMessage/index.tsx | 2 +- .../chatView/fileComponent/index.tsx | 2 +- .../fileComponent/utils/handle-download.tsx | 4 +- .../utils/format-file-name.tsx | 2 +- src/frontend/src/modals/apiModal/index.tsx | 18 +++---- .../utils/check-can-build-tweak-object.ts | 2 +- .../apiModal/utils/get-changes-types.ts | 2 +- .../modals/apiModal/utils/get-curl-code.tsx | 6 +-- .../utils/get-nodes-with-default-value.ts | 4 +- .../apiModal/utils/get-python-api-code.tsx | 2 +- .../modals/apiModal/utils/get-python-code.tsx | 2 +- .../src/modals/apiModal/utils/get-value.ts | 2 +- .../modals/apiModal/utils/get-widget-code.tsx | 2 +- .../src/modals/apiModal/utils/tabs-array.tsx | 2 +- src/frontend/src/modals/baseModal/index.tsx | 14 ++--- .../src/modals/confirmationModal/index.tsx | 4 +- .../editNodeModal/hooks/use-column-defs.tsx | 4 +- src/frontend/src/modals/exportModal/index.tsx | 6 +-- .../foldersModal/hooks/submit-folder.tsx | 4 +- .../src/modals/genericModal/index.tsx | 10 ++-- .../components/undrawCards/index.tsx | 8 +-- .../src/modals/newFlowModal/index.tsx | 2 +- src/frontend/src/modals/shareModal/index.tsx | 6 +-- .../modals/shareModal/utils/get-tags-ids.tsx | 2 +- src/frontend/src/modals/textModal/index.tsx | 4 +- src/frontend/src/pages/AdminPage/index.tsx | 8 +-- .../components/PageComponent/index.tsx | 32 +++++------ .../PageComponent/utils/get-random-name.tsx | 2 +- .../SelectionMenuComponent/index.tsx | 2 +- .../extraSidebarComponent/index.tsx | 28 +++++----- .../sideBarDraggableComponent/index.tsx | 12 ++--- .../components/nodeToolbarComponent/index.tsx | 34 ++++++------ .../toolbarSelectItem/index.tsx | 2 +- src/frontend/src/pages/FlowPage/index.tsx | 2 +- .../hooks/use-delete-multiple.tsx | 2 +- .../hooks/use-filtered-flows.tsx | 4 +- .../hooks/use-handle-duplicate.tsx | 8 +-- .../hooks/use-handle-export.tsx | 4 +- .../hooks/use-handle-select-all.tsx | 2 +- .../hooks/use-select-options-change.tsx | 4 +- .../hooks/use-selected-flows.tsx | 2 +- .../components/componentsComponent/index.tsx | 22 ++++---- .../headerTabsSearchComponent/index.tsx | 2 +- .../components/inputSearchComponent/index.tsx | 2 +- .../pages/MainPage/pages/mainPage/index.tsx | 2 +- .../src/pages/MainPage/services/index.ts | 12 ++--- .../MainPage/utils/handle-download-folder.ts | 2 +- src/frontend/src/pages/Playground/index.tsx | 2 +- .../src/pages/ProfileSettingsPage/index.tsx | 4 +- src/frontend/src/pages/SettingsPage/index.tsx | 2 +- .../hooks/use-handle-delete-key.tsx | 2 +- .../SettingsPage/pages/ApiKeysPage/index.tsx | 4 +- .../components/PasswordForm/index.tsx | 2 +- .../hooks/use-preload-images.tsx | 10 ++-- .../components/StoreApiKeyForm/index.tsx | 4 +- .../SettingsPage/pages/GeneralPage/index.tsx | 10 ++-- .../pages/GlobalVariablesPage/index.tsx | 6 +-- .../EditShortcutButton/index.tsx | 10 ++-- .../pages/hooks/use-patch-gradient.tsx | 2 +- .../pages/hooks/use-patch-profile-picture.tsx | 2 +- .../SettingsPage/pages/hooks/use-save-key.tsx | 4 +- .../hooks/use-remove-messages.tsx | 2 +- .../SettingsPage/pages/messagesPage/index.tsx | 4 +- src/frontend/src/pages/StorePage/index.tsx | 6 +-- src/frontend/src/pages/ViewPage/index.tsx | 2 +- src/frontend/src/routes.tsx | 10 ++-- src/frontend/src/stores/alertStore.ts | 6 +-- src/frontend/src/stores/darkStore.ts | 2 +- src/frontend/src/stores/flowsManagerStore.ts | 28 +++++----- src/frontend/src/stores/foldersStore.tsx | 16 +++--- .../globalVariablesStore/globalVariables.ts | 2 +- src/frontend/src/stores/messagesStore.ts | 6 +-- src/frontend/src/types/store/index.ts | 2 +- src/frontend/src/types/tabs/index.ts | 8 +-- src/frontend/src/types/zustand/flow/index.ts | 14 ++--- .../src/types/zustand/flowsManager/index.ts | 8 +-- .../src/types/zustand/folders/index.ts | 2 +- .../types/zustand/globalVariables/index.ts | 2 +- src/frontend/src/utils/buildUtils.ts | 18 +++---- src/frontend/src/utils/parameterUtils.ts | 4 +- src/frontend/src/utils/storeUtils.ts | 2 +- src/frontend/src/utils/utils.ts | 20 +++---- .../tests/end-to-end/chatInputOutput.spec.ts | 6 +-- .../end-to-end/chatInputOutputUser.spec.ts | 8 +-- .../end-to-end/curl_api_generation.spec.ts | 2 +- .../tests/end-to-end/dragAndDrop.spec.ts | 4 +- .../end-to-end/dropdownComponent.spec.ts | 28 +++++----- .../end-to-end/fileUploadComponent.spec.ts | 4 +- .../tests/end-to-end/filterEdge.spec.ts | 28 +++++----- .../tests/end-to-end/floatComponent.spec.ts | 14 ++--- .../tests/end-to-end/flowSettings.spec.ts | 4 +- src/frontend/tests/end-to-end/folders.spec.ts | 4 +- .../tests/end-to-end/inputComponent.spec.ts | 28 +++++----- .../end-to-end/inputListComponent.spec.ts | 18 +++---- .../tests/end-to-end/intComponent.spec.ts | 32 +++++------ .../end-to-end/keyPairListComponent.spec.ts | 4 +- .../end-to-end/langflowShortcuts.spec.ts | 4 +- .../tests/end-to-end/nestedComponent.spec.ts | 42 +++++++-------- .../end-to-end/promptModalComponent.spec.ts | 4 +- .../end-to-end/python_api_generation.spec.ts | 2 +- .../tests/end-to-end/saveComponents.spec.ts | 4 +- src/frontend/tests/end-to-end/store.spec.ts | 2 +- .../end-to-end/textAreaModalComponent.spec.ts | 2 +- .../tests/end-to-end/textInputOutput.spec.ts | 8 +-- .../tests/end-to-end/toggleComponent.spec.ts | 34 ++++++------ .../tests/end-to-end/tweaks_test.spec.ts | 4 +- 203 files changed, 693 insertions(+), 693 deletions(-) diff --git a/src/frontend/src/App.tsx b/src/frontend/src/App.tsx index b84c0d792..720ffb6b2 100644 --- a/src/frontend/src/App.tsx +++ b/src/frontend/src/App.tsx @@ -29,10 +29,10 @@ export default function App() { useTrackLastVisitedPath(); const removeFromTempNotificationList = useAlertStore( - (state) => state.removeFromTempNotificationList + (state) => state.removeFromTempNotificationList, ); const tempNotificationList = useAlertStore( - (state) => state.tempNotificationList + (state) => state.tempNotificationList, ); const [fetchError, setFetchError] = useState(false); const isLoading = useFlowsManagerStore((state) => state.isLoading); @@ -48,7 +48,7 @@ export default function App() { const refreshVersion = useDarkStore((state) => state.refreshVersion); const refreshStars = useDarkStore((state) => state.refreshStars); const setGlobalVariables = useGlobalVariablesStore( - (state) => state.setGlobalVariables + (state) => state.setGlobalVariables, ); const checkHasStore = useStoreStore((state) => state.checkHasStore); const navigate = useNavigate(); diff --git a/src/frontend/src/CustomNodes/GenericNode/components/OutputComponent/index.tsx b/src/frontend/src/CustomNodes/GenericNode/components/OutputComponent/index.tsx index 5e7cf1308..1ff965ab5 100644 --- a/src/frontend/src/CustomNodes/GenericNode/components/OutputComponent/index.tsx +++ b/src/frontend/src/CustomNodes/GenericNode/components/OutputComponent/index.tsx @@ -26,18 +26,22 @@ export default function OutputComponent({ const setNode = useFlowStore((state) => state.setNode); const updateNodeInternals = useUpdateNodeInternals(); - const displayProxy = (children)=>{ - if(proxy){ - return {proxy.nodeDisplayName}}> - {children} - - }else{ - return children + const displayProxy = (children) => { + if (proxy) { + return ( + {proxy.nodeDisplayName}}> + {children} + + ); + } else { + return children; } - } + }; if (types.length < 2) { - return displayProxy({name}); + return displayProxy( + {name}, + ); } return ( @@ -50,7 +54,7 @@ export default function OutputComponent({ size="xs" className={cn( frozen ? "text-ice" : "", - "items-center gap-1 pl-2 pr-1.5 align-middle text-xs font-normal" + "items-center gap-1 pl-2 pr-1.5 align-middle text-xs font-normal", )} > {selected} diff --git a/src/frontend/src/CustomNodes/GenericNode/components/tooltipRenderComponent/index.tsx b/src/frontend/src/CustomNodes/GenericNode/components/tooltipRenderComponent/index.tsx index c76bc7293..ed2760161 100644 --- a/src/frontend/src/CustomNodes/GenericNode/components/tooltipRenderComponent/index.tsx +++ b/src/frontend/src/CustomNodes/GenericNode/components/tooltipRenderComponent/index.tsx @@ -24,7 +24,7 @@ const TooltipRenderComponent = ({ item, index, left }) => { 0 ? "mt-2 flex items-center" : "mt-3 flex items-center" + index > 0 ? "mt-2 flex items-center" : "mt-3 flex items-center", )} >
{ let isInvalid = validationStatus && !validationStatus.valid; diff --git a/src/frontend/src/CustomNodes/hooks/use-check-code-validity.tsx b/src/frontend/src/CustomNodes/hooks/use-check-code-validity.tsx index 3a49ef62f..ec4d586f6 100644 --- a/src/frontend/src/CustomNodes/hooks/use-check-code-validity.tsx +++ b/src/frontend/src/CustomNodes/hooks/use-check-code-validity.tsx @@ -6,7 +6,7 @@ const useCheckCodeValidity = ( data: NodeDataType, templates: { [key: string]: any }, setIsOutdated: (value: boolean) => void, - types + types, ) => { useEffect(() => { // This one should run only once diff --git a/src/frontend/src/CustomNodes/hooks/use-fetch-data-on-mount.tsx b/src/frontend/src/CustomNodes/hooks/use-fetch-data-on-mount.tsx index 3b5c8ce74..5802863b0 100644 --- a/src/frontend/src/CustomNodes/hooks/use-fetch-data-on-mount.tsx +++ b/src/frontend/src/CustomNodes/hooks/use-fetch-data-on-mount.tsx @@ -12,7 +12,7 @@ const useFetchDataOnMount = ( name, handleUpdateValues, setNode, - setIsLoading + setIsLoading, ) => { const setErrorData = useAlertStore((state) => state.setErrorData); diff --git a/src/frontend/src/CustomNodes/hooks/use-handle-new-value.tsx b/src/frontend/src/CustomNodes/hooks/use-handle-new-value.tsx index 22625d96d..b9690e270 100644 --- a/src/frontend/src/CustomNodes/hooks/use-handle-new-value.tsx +++ b/src/frontend/src/CustomNodes/hooks/use-handle-new-value.tsx @@ -13,7 +13,7 @@ const useHandleOnNewValue = ( handleUpdateValues, debouncedHandleUpdateValues, setNode, - setIsLoading + setIsLoading, ) => { const setErrorData = useAlertStore((state) => state.setErrorData); diff --git a/src/frontend/src/CustomNodes/hooks/use-handle-node-class.tsx b/src/frontend/src/CustomNodes/hooks/use-handle-node-class.tsx index c2afa1ab1..6fb78ce10 100644 --- a/src/frontend/src/CustomNodes/hooks/use-handle-node-class.tsx +++ b/src/frontend/src/CustomNodes/hooks/use-handle-node-class.tsx @@ -5,7 +5,7 @@ const useHandleNodeClass = ( name, takeSnapshot, setNode, - updateNodeInternals + updateNodeInternals, ) => { const handleNodeClass = (newNodeClass, code) => { if (!data.node) return; diff --git a/src/frontend/src/CustomNodes/hooks/use-icon-render.tsx b/src/frontend/src/CustomNodes/hooks/use-icon-render.tsx index cc9e29c0e..181b4f515 100644 --- a/src/frontend/src/CustomNodes/hooks/use-icon-render.tsx +++ b/src/frontend/src/CustomNodes/hooks/use-icon-render.tsx @@ -12,8 +12,8 @@ const useIconNodeRender = ( checkNodeIconFragment: ( iconColor: string, iconName: string, - iconClassName: string - ) => JSX.Element + iconClassName: string, + ) => JSX.Element, ) => { const iconNodeRender = useCallback(() => { const iconElement = data?.node?.icon; diff --git a/src/frontend/src/CustomNodes/hooks/use-icons-status.tsx b/src/frontend/src/CustomNodes/hooks/use-icons-status.tsx index 19c6112d5..bea5d3f1f 100644 --- a/src/frontend/src/CustomNodes/hooks/use-icons-status.tsx +++ b/src/frontend/src/CustomNodes/hooks/use-icons-status.tsx @@ -6,7 +6,7 @@ import { VertexBuildTypeAPI } from "../../types/api"; const useIconStatus = ( buildStatus: BuildStatus | undefined, - validationStatus: VertexBuildTypeAPI | null + validationStatus: VertexBuildTypeAPI | null, ) => { const conditionSuccess = validationStatus && validationStatus.valid; const conditionError = diff --git a/src/frontend/src/CustomNodes/hooks/use-update-node-code.tsx b/src/frontend/src/CustomNodes/hooks/use-update-node-code.tsx index d919a4fa9..f1593597f 100644 --- a/src/frontend/src/CustomNodes/hooks/use-update-node-code.tsx +++ b/src/frontend/src/CustomNodes/hooks/use-update-node-code.tsx @@ -7,7 +7,7 @@ const useUpdateNodeCode = ( dataNode: APIClassType, // Define YourNodeType according to your data structure setNode: (id: string, callback: (oldNode) => any) => void, setIsOutdated: (value: boolean) => void, - updateNodeInternals: (id: string) => void + updateNodeInternals: (id: string) => void, ) => { const updateNodeCode = useCallback( (newNodeClass: APIClassType, code: string, name: string) => { @@ -30,7 +30,7 @@ const useUpdateNodeCode = ( updateNodeInternals(dataId); }, - [dataId, dataNode, setNode, setIsOutdated, updateNodeInternals] + [dataId, dataNode, setNode, setIsOutdated, updateNodeInternals], ); return updateNodeCode; diff --git a/src/frontend/src/CustomNodes/utils/get-field-title.tsx b/src/frontend/src/CustomNodes/utils/get-field-title.tsx index a00829a90..e448c4f01 100644 --- a/src/frontend/src/CustomNodes/utils/get-field-title.tsx +++ b/src/frontend/src/CustomNodes/utils/get-field-title.tsx @@ -2,7 +2,7 @@ import { APITemplateType } from "../../types/api"; export default function getFieldTitle( template: APITemplateType, - templateField: string + templateField: string, ): string { return template[templateField].display_name ? template[templateField].display_name! diff --git a/src/frontend/src/alerts/alertDropDown/index.tsx b/src/frontend/src/alerts/alertDropDown/index.tsx index 597431884..48c51088d 100644 --- a/src/frontend/src/alerts/alertDropDown/index.tsx +++ b/src/frontend/src/alerts/alertDropDown/index.tsx @@ -16,13 +16,13 @@ export default function AlertDropdown({ }: AlertDropdownType): JSX.Element { const notificationList = useAlertStore((state) => state.notificationList); const clearNotificationList = useAlertStore( - (state) => state.clearNotificationList + (state) => state.clearNotificationList, ); const removeFromNotificationList = useAlertStore( - (state) => state.removeFromNotificationList + (state) => state.removeFromNotificationList, ); const setNotificationCenter = useAlertStore( - (state) => state.setNotificationCenter + (state) => state.setNotificationCenter, ); const [open, setOpen] = useState(false); diff --git a/src/frontend/src/components/ImageViewer/index.tsx b/src/frontend/src/components/ImageViewer/index.tsx index e82836441..9e7f091d2 100644 --- a/src/frontend/src/components/ImageViewer/index.tsx +++ b/src/frontend/src/components/ImageViewer/index.tsx @@ -31,14 +31,14 @@ export default function ImageViewer({ image }) { const fullPageButton = document.getElementById("full-page-button"); zoomInButton!.addEventListener("click", () => - viewer.viewport.zoomBy(1.2) + viewer.viewport.zoomBy(1.2), ); zoomOutButton!.addEventListener("click", () => - viewer.viewport.zoomBy(0.8) + viewer.viewport.zoomBy(0.8), ); homeButton!.addEventListener("click", () => viewer.viewport.goHome()); fullPageButton!.addEventListener("click", () => - viewer.setFullScreen(true) + viewer.setFullScreen(true), ); // Optionally, you can set additional viewer options here @@ -47,16 +47,16 @@ export default function ImageViewer({ image }) { return () => { viewer.destroy(); zoomInButton!.removeEventListener("click", () => - viewer.viewport.zoomBy(1.2) + viewer.viewport.zoomBy(1.2), ); zoomOutButton!.removeEventListener("click", () => - viewer.viewport.zoomBy(0.8) + viewer.viewport.zoomBy(0.8), ); homeButton!.removeEventListener("click", () => - viewer.viewport.goHome() + viewer.viewport.goHome(), ); fullPageButton!.removeEventListener("click", () => - viewer.setFullScreen(true) + viewer.setFullScreen(true), ); }; } diff --git a/src/frontend/src/components/accordionComponent/composite/folderAccordionComponent/index.tsx b/src/frontend/src/components/accordionComponent/composite/folderAccordionComponent/index.tsx index 212a03fa2..d4fb95b5c 100644 --- a/src/frontend/src/components/accordionComponent/composite/folderAccordionComponent/index.tsx +++ b/src/frontend/src/components/accordionComponent/composite/folderAccordionComponent/index.tsx @@ -15,7 +15,7 @@ export default function FolderAccordionComponent({ options, }: AccordionComponentType): JSX.Element { const [value, setValue] = useState( - open.length === 0 ? "" : getOpenAccordion() + open.length === 0 ? "" : getOpenAccordion(), ); function getOpenAccordion(): string { diff --git a/src/frontend/src/components/accordionComponent/index.tsx b/src/frontend/src/components/accordionComponent/index.tsx index 43a0aef79..c9c21b8b2 100644 --- a/src/frontend/src/components/accordionComponent/index.tsx +++ b/src/frontend/src/components/accordionComponent/index.tsx @@ -17,7 +17,7 @@ export default function AccordionComponent({ sideBar, }: AccordionComponentType): JSX.Element { const [value, setValue] = useState( - open.length === 0 ? "" : getOpenAccordion() + open.length === 0 ? "" : getOpenAccordion(), ); function getOpenAccordion(): string { @@ -52,7 +52,7 @@ export default function AccordionComponent({ disabled={disabled} className={cn( sideBar ? "w-full bg-muted px-[0.75rem] py-[0.5rem]" : "ml-3", - disabled ? "cursor-not-allowed" : "cursor-pointer" + disabled ? "cursor-not-allowed" : "cursor-pointer", )} > {trigger} diff --git a/src/frontend/src/components/addNewVariableButtonComponent/addNewVariableButton.tsx b/src/frontend/src/components/addNewVariableButtonComponent/addNewVariableButton.tsx index d56a0e608..415cd92d7 100644 --- a/src/frontend/src/components/addNewVariableButtonComponent/addNewVariableButton.tsx +++ b/src/frontend/src/components/addNewVariableButtonComponent/addNewVariableButton.tsx @@ -29,19 +29,19 @@ export default function AddNewVariableButton({ const setErrorData = useAlertStore((state) => state.setErrorData); const componentFields = useTypesStore((state) => state.ComponentFields); const unavaliableFields = new Set( - Object.keys(useGlobalVariablesStore((state) => state.unavaliableFields)) + Object.keys(useGlobalVariablesStore((state) => state.unavaliableFields)), ); const availableFields = () => { const fields = Array.from(componentFields).filter( - (field) => !unavaliableFields.has(field) + (field) => !unavaliableFields.has(field), ); return sortByName(fields); }; const addGlobalVariable = useGlobalVariablesStore( - (state) => state.addGlobalVariable + (state) => state.addGlobalVariable, ); function handleSaveVariable() { diff --git a/src/frontend/src/components/cardComponent/components/dragCardComponent/index.tsx b/src/frontend/src/components/cardComponent/components/dragCardComponent/index.tsx index 54dbf4846..28674f3bc 100644 --- a/src/frontend/src/components/cardComponent/components/dragCardComponent/index.tsx +++ b/src/frontend/src/components/cardComponent/components/dragCardComponent/index.tsx @@ -10,7 +10,7 @@ export default function DragCardComponent({ data }: { data: storeComponent }) { draggable //TODO check color schema className={cn( - "group relative flex flex-col justify-between overflow-hidden transition-all hover:bg-muted/50 hover:shadow-md hover:dark:bg-[#ffffff10]" + "group relative flex flex-col justify-between overflow-hidden transition-all hover:bg-muted/50 hover:shadow-md hover:dark:bg-[#ffffff10]", )} >
@@ -22,7 +22,7 @@ export default function DragCardComponent({ data }: { data: storeComponent }) { "visible flex-shrink-0", data.is_component ? "mx-0.5 h-6 w-6 text-component-icon" - : "h-7 w-7 flex-shrink-0 text-flow-icon" + : "h-7 w-7 flex-shrink-0 text-flow-icon", )} name={data.is_component ? "ToyBrick" : "Group"} /> diff --git a/src/frontend/src/components/cardComponent/index.tsx b/src/frontend/src/components/cardComponent/index.tsx index 03c71feee..ba00e6958 100644 --- a/src/frontend/src/components/cardComponent/index.tsx +++ b/src/frontend/src/components/cardComponent/index.tsx @@ -60,11 +60,11 @@ export default function CollectionCardComponent({ const [loading, setLoading] = useState(false); const [loadingLike, setLoadingLike] = useState(false); const [liked_by_user, setLiked_by_user] = useState( - data?.liked_by_user ?? false + data?.liked_by_user ?? false, ); const [likes_count, setLikes_count] = useState(data?.liked_by_count ?? 0); const [downloads_count, setDownloads_count] = useState( - data?.downloads_count ?? 0 + data?.downloads_count ?? 0, ); const currentFlow = useFlowsManagerStore((state) => state.currentFlow); const setCurrentFlow = useFlowsManagerStore((state) => state.setCurrentFlow); @@ -75,12 +75,12 @@ export default function CollectionCardComponent({ const [openPlayground, setOpenPlayground] = useState(false); const [openDelete, setOpenDelete] = useState(false); const setCurrentFlowId = useFlowsManagerStore( - (state) => state.setCurrentFlowId + (state) => state.setCurrentFlowId, ); const [loadingPlayground, setLoadingPlayground] = useState(false); const selectedFlowsComponentsCards = useFlowsManagerStore( - (state) => state.selectedFlowsComponentsCards + (state) => state.selectedFlowsComponentsCards, ); const name = data.is_component ? "Component" : "Flow"; @@ -220,7 +220,7 @@ export default function CollectionCardComponent({ "group relative flex h-[11rem] flex-col justify-between overflow-hidden hover:bg-muted/50 hover:shadow-md hover:dark:bg-[#5f5f5f0e]", disabled ? "pointer-events-none opacity-50" : "", onClick ? "cursor-pointer" : "", - isSelectedCard ? "border border-selected" : "" + isSelectedCard ? "border border-selected" : "", )} onClick={onClick} > @@ -233,7 +233,7 @@ export default function CollectionCardComponent({ "visible flex-shrink-0", data.is_component ? "mx-0.5 h-6 w-6 text-component-icon" - : "h-7 w-7 flex-shrink-0 text-flow-icon" + : "h-7 w-7 flex-shrink-0 text-flow-icon", )} name={data.is_component ? "ToyBrick" : "Group"} /> @@ -425,7 +425,7 @@ export default function CollectionCardComponent({ name="Trash2" className={cn( "h-5 w-5", - !authorized ? "text-ring" : "" + !authorized ? "text-ring" : "", )} /> @@ -460,7 +460,7 @@ export default function CollectionCardComponent({ liked_by_user ? "fill-destructive stroke-destructive" : "", - !authorized ? "text-ring" : "" + !authorized ? "text-ring" : "", )} /> @@ -498,7 +498,7 @@ export default function CollectionCardComponent({ } className={cn( loading ? "h-5 w-5 animate-spin" : "h-5 w-5", - !authorized ? "text-ring" : "" + !authorized ? "text-ring" : "", )} /> diff --git a/src/frontend/src/components/cardsWrapComponent/index.tsx b/src/frontend/src/components/cardsWrapComponent/index.tsx index 0de3f1a2f..c7ca01588 100644 --- a/src/frontend/src/components/cardsWrapComponent/index.tsx +++ b/src/frontend/src/components/cardsWrapComponent/index.tsx @@ -65,7 +65,7 @@ export default function CardsWrapComponent({ "h-full w-full", isDragging ? "mb-36 flex flex-col items-center justify-center gap-4 text-2xl font-light" - : "" + : "", )} > {isDragging ? ( diff --git a/src/frontend/src/components/chatComponent/index.tsx b/src/frontend/src/components/chatComponent/index.tsx index 1dae86775..83c6c80c1 100644 --- a/src/frontend/src/components/chatComponent/index.tsx +++ b/src/frontend/src/components/chatComponent/index.tsx @@ -65,7 +65,7 @@ export default function FlowToolbar(): JSX.Element { "relative inline-flex h-full w-full items-center justify-center gap-[4px] bg-muted px-5 py-3 text-sm font-semibold text-foreground transition-all duration-150 ease-in-out hover:bg-background hover:bg-hover", !hasApiKey || !validApiKey || !hasStore ? "button-disable text-muted-foreground" - : "" + : "", )} > Share @@ -88,7 +88,7 @@ export default function FlowToolbar(): JSX.Element { hasStore, openShareModal, setOpenShareModal, - ] + ], ); return ( @@ -144,7 +144,7 @@ export default function FlowToolbar(): JSX.Element { >
{ if (disabled && myValue !== "") { diff --git a/src/frontend/src/components/codeTabsComponent/index.tsx b/src/frontend/src/components/codeTabsComponent/index.tsx index 448eca948..8b0106902 100644 --- a/src/frontend/src/components/codeTabsComponent/index.tsx +++ b/src/frontend/src/components/codeTabsComponent/index.tsx @@ -138,7 +138,7 @@ export default function CodeTabsComponent({