base page title
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import { type FC } from 'react'
|
||||
import { useLocation } from 'react-router-dom'
|
||||
import TitleLine from './TitleLine'
|
||||
import { getPageTitle } from '../config/PageTitles'
|
||||
|
||||
const PageTitle: FC = () => {
|
||||
const location = useLocation()
|
||||
const title = getPageTitle(location.pathname)
|
||||
|
||||
return <TitleLine title={title} />
|
||||
}
|
||||
|
||||
export default PageTitle
|
||||
@@ -6,7 +6,7 @@ type Props = {
|
||||
|
||||
const TitleLine: FC<Props> = (props: Props) => {
|
||||
return (
|
||||
<div className='w-full text-sm flex items-center gap-4'>
|
||||
<div className='w-full text-sm flex items-center gap-4 my-7'>
|
||||
<div className='whitespace-nowrap'>{props.title}</div>
|
||||
<svg style={{ width: '100%', height: 1 }} xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="none">
|
||||
<line x1="0" y1="0" x2="100%" y2="0" stroke="#aaa" strokeWidth="1" strokeDasharray="5 3" />
|
||||
|
||||
Reference in New Issue
Block a user