Removed unused functions
This commit is contained in:
parent
1a92ceca7e
commit
b6757d3ac1
2 changed files with 2 additions and 26 deletions
|
|
@ -1,27 +1,15 @@
|
|||
import { Trash2, ExternalLink, GitFork } from "lucide-react";
|
||||
import { useContext } from "react";
|
||||
import { Link, useNavigate } from "react-router-dom";
|
||||
import { alertContext } from "../../../../contexts/alertContext";
|
||||
import { TabsContext } from "../../../../contexts/tabsContext";
|
||||
import { updateFlowInDatabase } from "../../../../controllers/API";
|
||||
import { FlowType } from "../../../../types/flow";
|
||||
import { gradients } from "../../../../utils";
|
||||
import { CardTitle, CardDescription, CardFooter, Card, CardHeader } from "../../../../components/ui/card";
|
||||
import { Button } from "../../../../components/ui/button";
|
||||
|
||||
export const CardComponent = ({ flow, id }: { flow: FlowType; id: string }) => {
|
||||
const { setErrorData } = useContext(alertContext);
|
||||
const { updateFlow, addFlow } = useContext(TabsContext);
|
||||
const { addFlow } = useContext(TabsContext);
|
||||
const navigate = useNavigate();
|
||||
function handleSaveFlow(flow) {
|
||||
try {
|
||||
updateFlowInDatabase(flow);
|
||||
updateFlow(flow);
|
||||
// updateFlowStyleInDataBase(flow);
|
||||
} catch (err) {
|
||||
setErrorData(err);
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<Card className="group">
|
||||
|
|
|
|||
|
|
@ -1,26 +1,14 @@
|
|||
import { Trash2, ExternalLink } from "lucide-react";
|
||||
import { useContext } from "react";
|
||||
import { Link } from "react-router-dom";
|
||||
import { alertContext } from "../../../../contexts/alertContext";
|
||||
import { TabsContext } from "../../../../contexts/tabsContext";
|
||||
import { updateFlowInDatabase } from "../../../../controllers/API";
|
||||
import { FlowType } from "../../../../types/flow";
|
||||
import { gradients } from "../../../../utils";
|
||||
import { CardTitle, CardDescription, CardFooter, Card, CardHeader } from "../../../../components/ui/card";
|
||||
import { Button } from "../../../../components/ui/button";
|
||||
|
||||
export const CardComponent = ({ flow, id }: { flow: FlowType; id: string }) => {
|
||||
const { setErrorData } = useContext(alertContext);
|
||||
const { updateFlow, removeFlow, setTabId } = useContext(TabsContext);
|
||||
function handleSaveFlow(flow) {
|
||||
try {
|
||||
updateFlowInDatabase(flow);
|
||||
updateFlow(flow);
|
||||
// updateFlowStyleInDataBase(flow);
|
||||
} catch (err) {
|
||||
setErrorData(err);
|
||||
}
|
||||
}
|
||||
const { removeFlow } = useContext(TabsContext);
|
||||
|
||||
return (
|
||||
<Card className="group">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue