0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-10 15:42:39 +00:00

remove unused ref attributes

from editPage, homePage, newPage, and printPage, as well as splitPane.   The refs were declared, but never used.
This commit is contained in:
Gazook89
2024-05-16 23:23:42 -05:00
parent 8ae22bdc27
commit 78ce8aa6e3
5 changed files with 8 additions and 6 deletions

View File

@@ -390,7 +390,7 @@ const EditPage = createClass({
{this.renderNavbar()} {this.renderNavbar()}
<div className='content'> <div className='content'>
<SplitPane onDragFinish={this.handleSplitMove} ref='pane'> <SplitPane onDragFinish={this.handleSplitMove}>
<Editor <Editor
ref='editor' ref='editor'
brew={this.state.brew} brew={this.state.brew}

View File

@@ -79,7 +79,7 @@ const HomePage = createClass({
{this.renderNavbar()} {this.renderNavbar()}
<div className='content'> <div className='content'>
<SplitPane onDragFinish={this.handleSplitMove} ref='pane'> <SplitPane onDragFinish={this.handleSplitMove}>
<Editor <Editor
ref='editor' ref='editor'
brew={this.state.brew} brew={this.state.brew}

View File

@@ -213,7 +213,7 @@ const NewPage = createClass({
return <div className='newPage sitePage'> return <div className='newPage sitePage'>
{this.renderNavbar()} {this.renderNavbar()}
<div className='content'> <div className='content'>
<SplitPane onDragFinish={this.handleSplitMove} ref='pane'> <SplitPane onDragFinish={this.handleSplitMove}>
<Editor <Editor
ref='editor' ref='editor'
brew={this.state.brew} brew={this.state.brew}

View File

@@ -103,7 +103,7 @@ const PrintPage = createClass({
<link href={`/themes/${rendererPath}/${themePath}/style.css`} type="text/css" rel='stylesheet'/> <link href={`/themes/${rendererPath}/${themePath}/style.css`} type="text/css" rel='stylesheet'/>
{/* Apply CSS from Style tab */} {/* Apply CSS from Style tab */}
{this.renderStyle()} {this.renderStyle()}
<div className='pages' ref='pages' lang={this.state.brew.lang}> <div className='pages' lang={this.state.brew.lang}>
{this.renderPages()} {this.renderPages()}
</div> </div>
</div>; </div>;

View File

@@ -24,6 +24,9 @@ const SplitPane = createClass({
}; };
}, },
pane1 : React.createRef(null),
pane2 : React.createRef(null),
componentDidMount : function() { componentDidMount : function() {
const dividerPos = window.localStorage.getItem(this.props.storageKey); const dividerPos = window.localStorage.getItem(this.props.storageKey);
if(dividerPos){ if(dividerPos){
@@ -137,7 +140,6 @@ const SplitPane = createClass({
render : function(){ render : function(){
return <div className='splitPane' onPointerMove={this.handleMove} onPointerUp={this.handleUp}> return <div className='splitPane' onPointerMove={this.handleMove} onPointerUp={this.handleUp}>
<Pane <Pane
ref='pane1'
width={this.state.currentDividerPos} width={this.state.currentDividerPos}
> >
{React.cloneElement(this.props.children[0], { {React.cloneElement(this.props.children[0], {
@@ -147,7 +149,7 @@ const SplitPane = createClass({
})} })}
</Pane> </Pane>
{this.renderDivider()} {this.renderDivider()}
<Pane ref='pane2' isDragging={this.state.isDragging}>{this.props.children[1]}</Pane> <Pane isDragging={this.state.isDragging}>{this.props.children[1]}</Pane>
</div>; </div>;
} }
}); });