Merge pull request 'solved the sheet issue' (#4) from fahim-dev into main
Reviewed-on: https://git.planpostai.com/planpostai/planpost-landing-v2/pulls/4
This commit is contained in:
commit
a6f050dffb
1 changed files with 18 additions and 2 deletions
|
|
@ -3,8 +3,15 @@ import Link from "next/link";
|
||||||
import Image from "next/image";
|
import Image from "next/image";
|
||||||
import { Menu } from "lucide-react";
|
import { Menu } from "lucide-react";
|
||||||
import { Sheet, SheetContent, SheetTitle, SheetTrigger } from "./ui/sheet";
|
import { Sheet, SheetContent, SheetTitle, SheetTrigger } from "./ui/sheet";
|
||||||
|
import { useState } from "react";
|
||||||
|
|
||||||
export default function Header() {
|
export default function Header() {
|
||||||
|
const [isOpen, setIsOpen] = useState(false);
|
||||||
|
|
||||||
|
const handleClose = () => {
|
||||||
|
setIsOpen(false);
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<nav className="flex items-center justify-between pr-4 absolute z-50 w-full">
|
<nav className="flex items-center justify-between pr-4 absolute z-50 w-full">
|
||||||
<Link href="/">
|
<Link href="/">
|
||||||
|
|
@ -56,7 +63,7 @@ export default function Header() {
|
||||||
|
|
||||||
{/* Mobile Menu with Sheet Component */}
|
{/* Mobile Menu with Sheet Component */}
|
||||||
<div className="md:hidden">
|
<div className="md:hidden">
|
||||||
<Sheet>
|
<Sheet open={isOpen} onOpenChange={setIsOpen}>
|
||||||
<SheetTrigger asChild>
|
<SheetTrigger asChild>
|
||||||
<button className="text-gray-800 focus:outline-none mt-2">
|
<button className="text-gray-800 focus:outline-none mt-2">
|
||||||
<Menu className="w-8 h-8" />
|
<Menu className="w-8 h-8" />
|
||||||
|
|
@ -80,7 +87,11 @@ export default function Header() {
|
||||||
</div>
|
</div>
|
||||||
<ul className="flex flex-col space-y-6 text-gray-800 font-medium">
|
<ul className="flex flex-col space-y-6 text-gray-800 font-medium">
|
||||||
<li>
|
<li>
|
||||||
<Link href="/" className="hover:text-purple-600 text-lg">
|
<Link
|
||||||
|
href="/"
|
||||||
|
className="hover:text-purple-600 text-lg"
|
||||||
|
onClick={handleClose}
|
||||||
|
>
|
||||||
Home
|
Home
|
||||||
</Link>
|
</Link>
|
||||||
</li>
|
</li>
|
||||||
|
|
@ -88,6 +99,7 @@ export default function Header() {
|
||||||
<Link
|
<Link
|
||||||
href="/#feature"
|
href="/#feature"
|
||||||
className="hover:text-purple-600 text-lg"
|
className="hover:text-purple-600 text-lg"
|
||||||
|
onClick={handleClose}
|
||||||
>
|
>
|
||||||
Feature
|
Feature
|
||||||
</Link>
|
</Link>
|
||||||
|
|
@ -96,6 +108,7 @@ export default function Header() {
|
||||||
<Link
|
<Link
|
||||||
href="/#pricingSection"
|
href="/#pricingSection"
|
||||||
className="hover:text-purple-600 text-lg"
|
className="hover:text-purple-600 text-lg"
|
||||||
|
onClick={handleClose}
|
||||||
>
|
>
|
||||||
Pricing
|
Pricing
|
||||||
</Link>
|
</Link>
|
||||||
|
|
@ -104,6 +117,7 @@ export default function Header() {
|
||||||
<Link
|
<Link
|
||||||
href="/contact"
|
href="/contact"
|
||||||
className="hover:text-purple-600 text-lg"
|
className="hover:text-purple-600 text-lg"
|
||||||
|
onClick={handleClose}
|
||||||
>
|
>
|
||||||
Contact
|
Contact
|
||||||
</Link>
|
</Link>
|
||||||
|
|
@ -116,6 +130,7 @@ export default function Header() {
|
||||||
<Link
|
<Link
|
||||||
href="https://dashboard.planpostai.com/"
|
href="https://dashboard.planpostai.com/"
|
||||||
className="w-full"
|
className="w-full"
|
||||||
|
onClick={handleClose}
|
||||||
>
|
>
|
||||||
<button className="w-full font-bold px-5 py-3 border-[1px] border-[#6A47ED] text-[#6A47ED] rounded-xl hover:bg-purple-100">
|
<button className="w-full font-bold px-5 py-3 border-[1px] border-[#6A47ED] text-[#6A47ED] rounded-xl hover:bg-purple-100">
|
||||||
Log in
|
Log in
|
||||||
|
|
@ -124,6 +139,7 @@ export default function Header() {
|
||||||
<Link
|
<Link
|
||||||
href="https://dashboard.planpostai.com/"
|
href="https://dashboard.planpostai.com/"
|
||||||
className="w-full"
|
className="w-full"
|
||||||
|
onClick={handleClose}
|
||||||
>
|
>
|
||||||
<button className="w-full font-bold px-5 py-3 bg-[#6A47ED] text-white rounded-xl hover:bg-purple-700">
|
<button className="w-full font-bold px-5 py-3 bg-[#6A47ED] text-white rounded-xl hover:bg-purple-700">
|
||||||
Sign Up
|
Sign Up
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue