mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 18:44:16 +00:00
28 lines
588 B
JavaScript
28 lines
588 B
JavaScript
import React from "react"
|
|
import classnames from "classnames"
|
|
|
|
import "./index.less"
|
|
|
|
export default (props) => {
|
|
const [visible, setVisible] = React.useState(false)
|
|
|
|
const headerInterface = {
|
|
toggle: (to) => setVisible((prevValue) => to ?? !prevValue),
|
|
}
|
|
|
|
React.useEffect(() => {
|
|
app.layout.header = headerInterface
|
|
}, [])
|
|
|
|
return <div
|
|
className={classnames(
|
|
"page_header",
|
|
{
|
|
["visible"]: visible,
|
|
}
|
|
)}
|
|
>
|
|
{String(window.location.pathname).toTitleCase()}
|
|
</div>
|
|
}
|