set pagename

This commit is contained in:
Víctor Losada Hernández
2026-10-10 00:40:47 +02:00
parent 788cf08001
commit efef243d2b
10 changed files with 24 additions and 21 deletions
@@ -74,7 +74,7 @@ const AccountPage = (props)=>{
// return the account page inside the base layout wrapper (with navbar etc).
return (
<UIPage brew={brew}>
<UIPage brew={brew} pageName={'accountPage'}>
{renderAccountPage()}
</UIPage>);
};
@@ -16,7 +16,7 @@ const DEFAULT_SORT_TYPE = 'alpha';
const DEFAULT_SORT_DIR = 'asc';
const DEFAULT_LAYOUT_MODE = 'grid';
const ListPage = ({ brewCollection = [{ title: '', class: '', brews: [] }], navItems = <></>, reportError = null, query })=>{
const ListPage = ({ brewCollection = [{ title: '', class: '', brews: [] }], pageName, navItems = <></>, reportError = null, query })=>{
const [filterString, setFilterString] = useState(query?.filter || '');
const [filterTags, setFilterTags] = useState([]);
const [sortType, setSortType] = useState(query?.sort || null);
@@ -329,7 +329,7 @@ const ListPage = ({ brewCollection = [{ title: '', class: '', brews: [] }], navI
return (
<div className='listPage sitePage'>
<Navbar>{navItems}</Navbar>
<Navbar pageName={pageName} >{navItems}</Navbar>
{renderNav()}
@@ -8,7 +8,7 @@ const UIPage = createReactClass({
render : function(){
return <div className='uiPage sitePage'>
<Navbar/>
<Navbar pageName={this.props.pageName} />
<div className='content'>
{this.props.children}
</div>
@@ -9,7 +9,7 @@ const ErrorPage = ({ brew })=>{
const errorText = ErrorIndex({ brew })[brew.HBErrorCode.toString()] || '';
return (
<UIPage brew={{ title: 'Crit Fail!' }}>
<UIPage brew={{ title: 'Crit Fail!' }} pageName='errorPage'>
<div className='dataGroup'>
<div className='errorTitle'>
<h1>{`Error ${brew?.status || '000'}`}</h1>
@@ -68,7 +68,7 @@ const SharePage = (props)=>{
return (
<div className='sharePage sitePage'>
<Meta name='robots' content='noindex, nofollow' />
<Navbar brew={currentBrew} />
<Navbar brew={currentBrew} pageName='sharePage' />
<div className='content'>
<BrewRenderer
text={currentBrew.text}
+1 -1
View File
@@ -34,7 +34,7 @@ const UserPage = (props)=>{
};
return (
<ListPage brewCollection={brewCollection} query={props.query} reportError={(err)=>setError(err)} />
<ListPage pageName={pageName} brewCollection={brewCollection} query={props.query} reportError={(err)=>setError(err)} />
);
};
@@ -393,7 +393,7 @@ const VaultPage = (props)=>{
<div className='sitePage vaultPage'>
<link href='/themes/V3/Blank/style.css' rel='stylesheet' />
<link href='/themes/V3/5ePHB/style.css' rel='stylesheet' />
<Navbar/>
<Navbar pageName={'vaultPage'}/>
<div className='content'>
<SplitPane showDividerButtons={false}>
<div className='form dataGroup'>{renderForm()}</div>