Refactor layout.js and Header.jsx files
This commit is contained in:
parent
353aa4be9b
commit
c29d647c7b
@ -2,7 +2,6 @@ import { Inter } from 'next/font/google'
|
|||||||
|
|
||||||
import RecoilRootWrapper from './RecoilWrapper'
|
import RecoilRootWrapper from './RecoilWrapper'
|
||||||
import UIProvider from './UIProvider'
|
import UIProvider from './UIProvider'
|
||||||
import { headers } from 'next/headers'
|
|
||||||
|
|
||||||
import { ToastContainer } from 'react-toastify'
|
import { ToastContainer } from 'react-toastify'
|
||||||
import QModal from '@/components/common/modal/QModal'
|
import QModal from '@/components/common/modal/QModal'
|
||||||
@ -19,10 +18,6 @@ export const metadata = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default function RootLayout({ children }) {
|
export default function RootLayout({ children }) {
|
||||||
const headersList = headers()
|
|
||||||
const headerPathname = headersList.get('x-pathname') || ''
|
|
||||||
// console.log('headerPathname', headerPathname)
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<body className={inter.className}>
|
<body className={inter.className}>
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
'use client'
|
'use client'
|
||||||
import Link from 'next/link'
|
import Link from 'next/link'
|
||||||
import QSelectBox from '@/components/common/select/QSelectBox'
|
import QSelectBox from '@/components/common/select/QSelectBox'
|
||||||
|
import { usePathname } from 'next/navigation'
|
||||||
|
|
||||||
export const ToggleonMouse = (e, act, target) => {
|
export const ToggleonMouse = (e, act, target) => {
|
||||||
const listWrap = e.target.closest(target)
|
const listWrap = e.target.closest(target)
|
||||||
@ -18,7 +19,12 @@ export const ToggleonMouse = (e, act, target) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default function Header() {
|
export default function Header() {
|
||||||
|
const pathName = usePathname()
|
||||||
|
if (pathName.includes('login')) {
|
||||||
|
return null
|
||||||
|
}
|
||||||
const SelectOption = [{ name: 'オンライン保証シ' }, { name: 'ステム' }]
|
const SelectOption = [{ name: 'オンライン保証シ' }, { name: 'ステム' }]
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<header>
|
<header>
|
||||||
<div className="header-inner">
|
<div className="header-inner">
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user