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({
title: "Success! Your API Key has been saved.",
});
storeApiKey('9bxW74lS1qee3UWKMx3Vydxu5wxPqC8W');
storeApiKey("9bxW74lS1qee3UWKMx3Vydxu5wxPqC8W");
setOpen(false);
},
(error) => {

View file

@ -1,5 +1,8 @@
import { Link, ToyBrick } from "lucide-react";
import { useState } from "react";
import IconComponent from "../../../components/genericIconComponent";
import { Badge } from "../../../components/ui/badge";
import { Button } from "../../../components/ui/button";
import {
Card,
CardDescription,
@ -16,6 +19,8 @@ export const MarketCardComponent = ({
data: FlowComponent;
onAdd: () => void;
}) => {
const [added, setAdded] = useState(false);
return (
<Card className="group relative flex cursor-pointer flex-col justify-between overflow-hidden transition-all hover:shadow-md">
<div>
@ -86,6 +91,25 @@ export const MarketCardComponent = ({
Added
</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>
</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 items-center justify-center gap-4">
<div className="flex w-[13%] items-center justify-center gap-3 text-sm">
Installed Only <Switch />
Added Only <Switch />
</div>
<div className="relative h-12 w-[35%]">
<Input

View file

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