Skip to content

Commit

Permalink
configuration position changed
Browse files Browse the repository at this point in the history
  • Loading branch information
Shofiul735 committed Dec 6, 2024
1 parent a0978bb commit 9c1776e
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/app/_components/HomePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ export const HomePage = () => {
<Navbar />
<div className="w-4/5 mx-auto mt-6">
<Tabs defaultValue="single" className="w-full">
<TabsList className="grid w-full grid-cols-3 mb-8">
<TabsList className="grid w-full grid-cols-2 mb-8">
<TabsTrigger value="single" className="font-bold">Single QR Code</TabsTrigger>
<TabsTrigger value="bulk" className="font-bold">Bulk Creation</TabsTrigger>
<TabsTrigger value="style" className="font-bold">Configure QR Style</TabsTrigger>
{/* <TabsTrigger value="style" className="font-bold">Configure QR Style</TabsTrigger> */}
</TabsList>

<TabsContent value="single">
Expand All @@ -28,11 +28,11 @@ export const HomePage = () => {
</div>
</TabsContent>

<TabsContent value="style">
{/* <TabsContent value="style">
<div className="space-y-4">
<QRStyle />
</div>
</TabsContent>
</TabsContent> */}
</Tabs>
</div>
</section>
Expand Down
18 changes: 15 additions & 3 deletions src/app/_components/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@

import React from 'react';
import { Button } from "@/components/ui/button";
import { MoonIcon, SunIcon } from "lucide-react";
import { MoonIcon, SunIcon, Settings } from "lucide-react";
import { useTheme } from "next-themes";
import { useRouter } from "next/navigation";

const Navbar = () => {
const { theme, setTheme } = useTheme();
const router = useRouter();

return (
<div className="border-b">
Expand All @@ -16,8 +18,8 @@ const Navbar = () => {
<span className="text-xl font-bold">QR-23</span>
</div>

{/* Theme Toggle */}
<div className="ml-auto">
{/* Theme Toggle and Configuration */}
<div className="ml-auto flex items-center space-x-2">
<Button
variant="ghost"
size="icon"
Expand All @@ -28,6 +30,16 @@ const Navbar = () => {
<MoonIcon className="absolute h-4 w-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100" />
<span className="sr-only">Toggle theme</span>
</Button>

<Button
variant="ghost"
size="icon"
className="h-9 w-9"
onClick={() => router.push('/configure')}
>
<Settings className="h-4 w-4" />
<span className="sr-only">Open configuration</span>
</Button>
</div>
</div>
</div>
Expand Down
9 changes: 9 additions & 0 deletions src/app/configure/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import QRStyle from "../_components/QR/QRStyle/QRStyle";

const ConfigurePage = () => {
return <div className="w-[80%] h-screen flex justify-center items-center">
<QRStyle/>
</div>
}

export default ConfigurePage;

0 comments on commit 9c1776e

Please sign in to comment.