🎨 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 { Link, useNavigate } from "react-router-dom";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import { TabsContext } from "../../../../contexts/tabsContext";
|
||||
import { FlowType } from "../../../../types/flow";
|
||||
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";
|
||||
|
||||
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 " +
|
||||
gradients[parseInt(flow.id.slice(0, 6), 16) % gradients.length]
|
||||
}
|
||||
>
|
||||
</span>
|
||||
<span className="flex-1 truncate-doubleline">
|
||||
{flow.name}
|
||||
</span>
|
||||
></span>
|
||||
<span className="flex-1 truncate-doubleline">{flow.name}</span>
|
||||
</div>
|
||||
|
||||
</CardTitle>
|
||||
<CardDescription className="pt-2 pb-2">
|
||||
<div className="truncate-doubleline">
|
||||
|
|
@ -48,19 +50,19 @@ export const CardComponent = ({ flow, id }: { flow: FlowType; id: string }) => {
|
|||
<span className="text-base"> </span>OpenAI+
|
||||
</Badge> */}
|
||||
</div>
|
||||
<Button
|
||||
variant="outline"
|
||||
size="sm"
|
||||
className="whitespace-nowrap "
|
||||
onClick={() => {
|
||||
addFlow(flow).then((id) => {
|
||||
navigate("/flow/"+id);
|
||||
});
|
||||
}}
|
||||
>
|
||||
<GitFork className="w-4 mr-2" />
|
||||
Fork Example
|
||||
</Button>
|
||||
<Button
|
||||
variant="outline"
|
||||
size="sm"
|
||||
className="whitespace-nowrap "
|
||||
onClick={() => {
|
||||
addFlow(flow, true).then((id) => {
|
||||
navigate("/flow/" + id);
|
||||
});
|
||||
}}
|
||||
>
|
||||
<GitFork className="w-4 mr-2" />
|
||||
Fork Example
|
||||
</Button>
|
||||
</div>
|
||||
</CardFooter>
|
||||
</Card>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue