Skip to content

Commit

Permalink
fix: hide back button in navbar on home page and resolve padding issu… (
Browse files Browse the repository at this point in the history
  • Loading branch information
ajeeshRS authored Sep 24, 2024
1 parent f5353da commit 2f37b07
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/app/payout-methods/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default function Page() {

return (
<div className="h-max pb-4 transition-colors duration-500 md:p-8">
<div className="mb-6 flex flex-col items-start justify-center px-4 pt-3 sm:px-8">
<div className="mb-6 flex flex-col items-start justify-center px-4 md:pt-20 pt-24 sm:px-8">
<div className="my-2 mb-6 text-3xl text-black transition-colors duration-500 dark:text-white">
<h1 className="mt-16 font-semibold text-black dark:text-white sm:mt-12">
Payout Methods
Expand Down
8 changes: 4 additions & 4 deletions src/components/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import { motion, AnimatePresence } from 'framer-motion';
import { useSession } from 'next-auth/react';
import { useRouter } from 'next/navigation';
import { usePathname, useRouter } from 'next/navigation';
import { useState } from 'react';
import Link from 'next/link';
import { ArrowLeft, Menu } from 'lucide-react';
Expand All @@ -15,7 +15,7 @@ export const Navbar = () => {
const { data: session } = useSession();
const router = useRouter();
const [isMenuOpen, setIsMenuOpen] = useState(false);

const pathname = usePathname();
const toggleMenu = () => setIsMenuOpen(!isMenuOpen);

const navItemVariants = {
Expand All @@ -42,7 +42,7 @@ export const Navbar = () => {
damping: 10,
stiffness: 100,
}}
className="fixed z-[999] top-0 w-full border-b border-primary/10 bg-background"
className="fixed top-0 z-[999] w-full border-b border-primary/10 bg-background"
>
<div className="wrapper flex w-full items-center justify-between p-3">
<motion.div
Expand All @@ -52,7 +52,7 @@ export const Navbar = () => {
variants={navItemVariants}
custom={0}
>
{session?.user && (
{session?.user && pathname !== '/home' && (
<Button
onClick={() => router.back()}
variant={'ghost'}
Expand Down
2 changes: 1 addition & 1 deletion src/components/big-calendar/calendar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ const CalendarPageComponent: React.FC<CalendarPageProps> = ({ isAdmin }) => {
};

return (
<main className="w-full">
<main className="w-full pt-20">
{isAdmin && (
<Button onClick={() => setIsAddEventDialogOpen(true)}>Add Event</Button>
)}
Expand Down

0 comments on commit 2f37b07

Please sign in to comment.