File size: 323 Bytes
f201243
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
"use client";

import React from "react";
import { usePathname } from "next/navigation";
import { Header } from "./Header";

export const ConditionalHeader: React.FC = () => {
  const pathname = usePathname();
  const isLoginPage = pathname === "/login";

  if (isLoginPage) {
    return null;
  }

  return <Header />;
};