Refactor: Remove dead code
This commit is contained in:
parent
c7d0444adf
commit
2d3c341abe
3 changed files with 4 additions and 24 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
import { useMemo, useState } from "react";
|
import { useState } from "react";
|
||||||
import {
|
import {
|
||||||
DropdownMenu,
|
DropdownMenu,
|
||||||
DropdownMenuContent,
|
DropdownMenuContent,
|
||||||
|
|
@ -14,7 +14,7 @@ import FlowSettingsModal from "../../../../modals/flowSettingsModal";
|
||||||
import useAlertStore from "../../../../stores/alertStore";
|
import useAlertStore from "../../../../stores/alertStore";
|
||||||
import useFlowStore from "../../../../stores/flowStore";
|
import useFlowStore from "../../../../stores/flowStore";
|
||||||
import useFlowsManagerStore from "../../../../stores/flowsManagerStore";
|
import useFlowsManagerStore from "../../../../stores/flowsManagerStore";
|
||||||
import { classNames, cn } from "../../../../utils/utils";
|
import { cn } from "../../../../utils/utils";
|
||||||
import ShadTooltip from "../../../ShadTooltipComponent";
|
import ShadTooltip from "../../../ShadTooltipComponent";
|
||||||
import IconComponent from "../../../genericIconComponent";
|
import IconComponent from "../../../genericIconComponent";
|
||||||
import { Button } from "../../../ui/button";
|
import { Button } from "../../../ui/button";
|
||||||
|
|
@ -40,22 +40,6 @@ export const MenuBar = ({
|
||||||
const validApiKey = useStoreStore((state) => state.validApiKey);
|
const validApiKey = useStoreStore((state) => state.validApiKey);
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const isBuilding = useFlowStore((state) => state.isBuilding);
|
const isBuilding = useFlowStore((state) => state.isBuilding);
|
||||||
const [myOpen, mySetOpen] = useState<boolean>(false)
|
|
||||||
|
|
||||||
const ExportMemo = useMemo(
|
|
||||||
() => (
|
|
||||||
<ExportModal
|
|
||||||
myOpen={myOpen}
|
|
||||||
mySetOpen={mySetOpen}
|
|
||||||
>
|
|
||||||
<div className="flex items-center">
|
|
||||||
<IconComponent name="FileDown" className="header-menu-options" />
|
|
||||||
Export
|
|
||||||
</div>
|
|
||||||
</ExportModal>
|
|
||||||
),
|
|
||||||
[]
|
|
||||||
);
|
|
||||||
|
|
||||||
function handleAddFlow() {
|
function handleAddFlow() {
|
||||||
try {
|
try {
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ import { downloadFlow, removeApiKeys } from "../../utils/reactflowUtils";
|
||||||
import BaseModal from "../baseModal";
|
import BaseModal from "../baseModal";
|
||||||
|
|
||||||
const ExportModal = forwardRef(
|
const ExportModal = forwardRef(
|
||||||
(props: { children: ReactNode, myOpen?: boolean, mySetOpen?: (open: boolean) => void }, ref): JSX.Element => {
|
(props: { children: ReactNode }, ref): JSX.Element => {
|
||||||
const version = useDarkStore((state) => state.version);
|
const version = useDarkStore((state) => state.version);
|
||||||
const setNoticeData = useAlertStore((state) => state.setNoticeData);
|
const setNoticeData = useAlertStore((state) => state.setNoticeData);
|
||||||
const [checked, setChecked] = useState(true);
|
const [checked, setChecked] = useState(true);
|
||||||
|
|
@ -29,10 +29,6 @@ const ExportModal = forwardRef(
|
||||||
const [description, setDescription] = useState(currentFlow!.description);
|
const [description, setDescription] = useState(currentFlow!.description);
|
||||||
const [open, setOpen] = useState(false);
|
const [open, setOpen] = useState(false);
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
console.log(open)
|
|
||||||
}, [open])
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<BaseModal size="smaller-h-full" open={open} setOpen={setOpen}>
|
<BaseModal size="smaller-h-full" open={open} setOpen={setOpen}>
|
||||||
<BaseModal.Trigger asChild>{props.children}</BaseModal.Trigger>
|
<BaseModal.Trigger asChild>{props.children}</BaseModal.Trigger>
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ export const SidebarDraggableComponent = forwardRef(
|
||||||
const deleteComponent = useFlowsManagerStore(
|
const deleteComponent = useFlowsManagerStore(
|
||||||
(state) => state.deleteComponent
|
(state) => state.deleteComponent
|
||||||
);
|
);
|
||||||
console.log(display_name)
|
|
||||||
const version = useDarkStore((state) => state.version);
|
const version = useDarkStore((state) => state.version);
|
||||||
const [cursorPos, setCursorPos] = useState({ x: 0, y: 0 });
|
const [cursorPos, setCursorPos] = useState({ x: 0, y: 0 });
|
||||||
const popoverRef = useRef<HTMLDivElement>(null);
|
const popoverRef = useRef<HTMLDivElement>(null);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue