优化用户数据初始化时机
This commit is contained in:
18
src/app/(home)/_components/header/common.tsx
Normal file
18
src/app/(home)/_components/header/common.tsx
Normal file
@@ -0,0 +1,18 @@
|
||||
import {createContext} from 'react'
|
||||
import Image, {StaticImageData} from 'next/image'
|
||||
|
||||
export const HeaderContext = createContext<{
|
||||
setMenu: (value: boolean) => void
|
||||
} | null>(null)
|
||||
|
||||
export function FragmentTitle(props: {
|
||||
text: string
|
||||
img: StaticImageData
|
||||
}) {
|
||||
return (
|
||||
<h3 className="font-bold flex items-center gap-3">
|
||||
<Image src={props.img} alt="icon" aria-hidden className="size-8 lg:size-9"/>
|
||||
<span>{props.text}</span>
|
||||
</h3>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user