🎨 style(cardComponent): format code with Prettier
This commit only formats the code with Prettier to improve code readability and consistency. No functional changes were made.
This commit is contained in:
parent
23d56efda7
commit
d78f2a81c5
1 changed files with 24 additions and 22 deletions
|
|
@ -1,10 +1,16 @@
|
||||||
import { Trash2, ExternalLink, GitFork } from "lucide-react";
|
import { GitFork } from "lucide-react";
|
||||||
import { useContext } from "react";
|
import { useContext } from "react";
|
||||||
import { Link, useNavigate } from "react-router-dom";
|
import { useNavigate } from "react-router-dom";
|
||||||
import { TabsContext } from "../../../../contexts/tabsContext";
|
import { TabsContext } from "../../../../contexts/tabsContext";
|
||||||
import { FlowType } from "../../../../types/flow";
|
import { FlowType } from "../../../../types/flow";
|
||||||
import { gradients } from "../../../../utils";
|
import { gradients } from "../../../../utils";
|
||||||
import { CardTitle, CardDescription, CardFooter, Card, CardHeader } from "../../../../components/ui/card";
|
import {
|
||||||
|
CardTitle,
|
||||||
|
CardDescription,
|
||||||
|
CardFooter,
|
||||||
|
Card,
|
||||||
|
CardHeader,
|
||||||
|
} from "../../../../components/ui/card";
|
||||||
import { Button } from "../../../../components/ui/button";
|
import { Button } from "../../../../components/ui/button";
|
||||||
|
|
||||||
export const CardComponent = ({ flow, id }: { flow: FlowType; id: string }) => {
|
export const CardComponent = ({ flow, id }: { flow: FlowType; id: string }) => {
|
||||||
|
|
@ -21,13 +27,9 @@ export const CardComponent = ({ flow, id }: { flow: FlowType; id: string }) => {
|
||||||
"rounded-full w-8 h-8 flex items-center justify-center text-2xl " +
|
"rounded-full w-8 h-8 flex items-center justify-center text-2xl " +
|
||||||
gradients[parseInt(flow.id.slice(0, 6), 16) % gradients.length]
|
gradients[parseInt(flow.id.slice(0, 6), 16) % gradients.length]
|
||||||
}
|
}
|
||||||
>
|
></span>
|
||||||
</span>
|
<span className="flex-1 truncate-doubleline">{flow.name}</span>
|
||||||
<span className="flex-1 truncate-doubleline">
|
|
||||||
{flow.name}
|
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</CardTitle>
|
</CardTitle>
|
||||||
<CardDescription className="pt-2 pb-2">
|
<CardDescription className="pt-2 pb-2">
|
||||||
<div className="truncate-doubleline">
|
<div className="truncate-doubleline">
|
||||||
|
|
@ -48,19 +50,19 @@ export const CardComponent = ({ flow, id }: { flow: FlowType; id: string }) => {
|
||||||
<span className="text-base"> </span>OpenAI+
|
<span className="text-base"> </span>OpenAI+
|
||||||
</Badge> */}
|
</Badge> */}
|
||||||
</div>
|
</div>
|
||||||
<Button
|
<Button
|
||||||
variant="outline"
|
variant="outline"
|
||||||
size="sm"
|
size="sm"
|
||||||
className="whitespace-nowrap "
|
className="whitespace-nowrap "
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
addFlow(flow).then((id) => {
|
addFlow(flow, true).then((id) => {
|
||||||
navigate("/flow/"+id);
|
navigate("/flow/" + id);
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<GitFork className="w-4 mr-2" />
|
<GitFork className="w-4 mr-2" />
|
||||||
Fork Example
|
Fork Example
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</CardFooter>
|
</CardFooter>
|
||||||
</Card>
|
</Card>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue