Skip to content

Commit

Permalink
Merge pull request #3 from srdarkseer/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
srdarkseer authored Apr 15, 2024
2 parents 3deb06b + 5b622d9 commit 186716d
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/components/ui/button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const buttonVariants = cva(
"bg-secondary text-secondary-foreground hover:bg-secondary/80",
ghost: "hover:bg-accent hover:text-accent-foreground",
link: "text-primary underline-offset-4 hover:underline",
whiteBg: "bg-white dark:bg-darkGreen text-primary dark:text-white hover:bg-primary/70 dark:hover:bg-darkGreen/70",
whiteBg: "bg-white dark:bg-darkGreen text-primary dark:text-white hover:bg-white/80 dark:hover:bg-darkGreen/70 hover:text-black dark:hover:text-white",
clear: ""
},
size: {
Expand Down
2 changes: 1 addition & 1 deletion src/components/ui/switch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const Switch = React.forwardRef<
>(({ className, ...props }, ref) => (
<SwitchPrimitives.Root
className={cn(
"peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-black data-[state=unchecked]:bg-input",
"peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-pine data-[state=unchecked]:bg-pine",
className
)}
{...props}
Expand Down
6 changes: 5 additions & 1 deletion src/layouts/MainLayout/components/Topbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,11 @@ const TopBar: FC = () => {
? "Disconnect"
: "Authorize with wallet"}
</Button>
<Switch id="theme-mode" onClick={toggleThemeHandler} />
<Switch
defaultChecked={true}
id="theme-mode"
onClick={toggleThemeHandler}
/>
</div>
</div>
</header>
Expand Down
19 changes: 12 additions & 7 deletions src/views/Landing/Landing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,20 @@ const Landing = () => {
}

useEffect(() => {
if (wallet && attemptedConnectionFromSection) {
setIsModalOpen(true);
// Reset the flag to avoid unintended modal openings.
setAttemptedConnectionFromSection(false);
} else {
setIsModalOpen(false);
}
const timeoutId = setTimeout(() => {
if (wallet && attemptedConnectionFromSection) {
setIsModalOpen(true);
// Reset the flag to avoid unintended modal openings.
setAttemptedConnectionFromSection(false);
}
}, 2000);

return () => {
clearTimeout(timeoutId);
};
}, [wallet, attemptedConnectionFromSection]);


return (
<div className="h-[90vh] container flex items-center justify-center">
<div className="grid grid-cols-12 h-[526px] gap-4">
Expand Down
16 changes: 10 additions & 6 deletions src/views/Landing/components/PopUpModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,14 @@ const PopUpModal = ({ isOpen }: { isOpen: boolean }) => {
</DialogTrigger>
<DialogContent>
{currentStep === "form" && (
<div>
<div className="h-full flex flex-col justify-center">
<DialogHeader>
<DialogTitle>Create Data</DialogTitle>
<DialogTitle>
<div className="absolute top-10">Create Data</div>
</DialogTitle>
</DialogHeader>
<div className="space-y-6 pt-12">
<div>
<div className="space-y-6 px-6 pb-12 pt-8 bg-hunterGreen rounded-lg">
<div className="space-y-2">
<Label>Data Type</Label>
<Select onValueChange={setDataType}>
<SelectTrigger>
Expand All @@ -135,11 +137,13 @@ const PopUpModal = ({ isOpen }: { isOpen: boolean }) => {
</SelectContent>
</Select>
</div>
<div>

<div className="space-y-2">
<Label htmlFor="file">CSV file</Label>
<Input ref={fileInputRef} id="file" type="file" />
</div>
<div>

<div className="space-y-2">
<Label htmlFor="num_rows">Rows Number</Label>
<Input
id="num_rows"
Expand Down

0 comments on commit 186716d

Please sign in to comment.