fix(modals): change single quotes to double quotes for consistency in StoreApiKeyModal component

feat(modals): add support for storing API key in StoreApiKeyModal component
fix(pages): add missing imports and state hook in MarketCardComponent
feat(pages): update button text and functionality in MarketCardComponent
fix(pages): update label text in StorePage component
fix(utils): add missing imports for GitBranchPlus and BookmarkPlus icons in styleUtils
This commit is contained in:
anovazzi1 2023-10-24 18:05:02 -03:00
commit 7411435924
4 changed files with 30 additions and 2 deletions

View file

@ -51,7 +51,7 @@ export default function StoreApiKeyModal({
setSuccessData({ setSuccessData({
title: "Success! Your API Key has been saved.", title: "Success! Your API Key has been saved.",
}); });
storeApiKey('9bxW74lS1qee3UWKMx3Vydxu5wxPqC8W'); storeApiKey("9bxW74lS1qee3UWKMx3Vydxu5wxPqC8W");
setOpen(false); setOpen(false);
}, },
(error) => { (error) => {

View file

@ -1,5 +1,8 @@
import { Link, ToyBrick } from "lucide-react"; import { Link, ToyBrick } from "lucide-react";
import { useState } from "react";
import IconComponent from "../../../components/genericIconComponent";
import { Badge } from "../../../components/ui/badge"; import { Badge } from "../../../components/ui/badge";
import { Button } from "../../../components/ui/button";
import { import {
Card, Card,
CardDescription, CardDescription,
@ -16,6 +19,8 @@ export const MarketCardComponent = ({
data: FlowComponent; data: FlowComponent;
onAdd: () => void; onAdd: () => void;
}) => { }) => {
const [added, setAdded] = useState(false);
return ( return (
<Card className="group relative flex cursor-pointer flex-col justify-between overflow-hidden transition-all hover:shadow-md"> <Card className="group relative flex cursor-pointer flex-col justify-between overflow-hidden transition-all hover:shadow-md">
<div> <div>
@ -86,6 +91,25 @@ export const MarketCardComponent = ({
Added Added
</Button> </Button>
)} */} )} */}
<Button
variant="outline"
size="sm"
className="whitespace-nowrap "
onClick={() => {
if (!added) {
setAdded(true);
} else {
//download
}
onAdd();
}}
>
<IconComponent
name={added ? "GitBranchPlus" : "BookmarkPlus"}
className="main-page-nav-button"
/>
{added ? "Install Localy" : "Add to Account"}
</Button>
</div> </div>
</div> </div>
</CardFooter> </CardFooter>

View file

@ -135,7 +135,7 @@ export default function StorePage(): JSX.Element {
<div className="flex w-full flex-col gap-4 p-4"> <div className="flex w-full flex-col gap-4 p-4">
<div className="flex items-center justify-center gap-4"> <div className="flex items-center justify-center gap-4">
<div className="flex w-[13%] items-center justify-center gap-3 text-sm"> <div className="flex w-[13%] items-center justify-center gap-3 text-sm">
Installed Only <Switch /> Added Only <Switch />
</div> </div>
<div className="relative h-12 w-[35%]"> <div className="relative h-12 w-[35%]">
<Input <Input

View file

@ -2,6 +2,7 @@ import {
ArrowUpToLine, ArrowUpToLine,
Bell, Bell,
BookMarked, BookMarked,
BookmarkPlus,
Check, Check,
CheckCircle2, CheckCircle2,
ChevronDown, ChevronDown,
@ -32,6 +33,7 @@ import {
FileUp, FileUp,
Fingerprint, Fingerprint,
Gift, Gift,
GitBranchPlus,
GitFork, GitFork,
GithubIcon, GithubIcon,
Group, Group,
@ -328,4 +330,6 @@ export const nodeIconsLucide: iconsType = {
Maximize2, Maximize2,
SaveAll, SaveAll,
Share2, Share2,
GitBranchPlus,
BookmarkPlus,
}; };