mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-10 15:42:39 +00:00
change conditions for google error
This commit is contained in:
@@ -349,7 +349,7 @@ const EditPage = createClass({
|
|||||||
</Nav.item>;
|
</Nav.item>;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this.state.errors.status == '403' && this.state.errors.response.body.errors[0].reason == 'insufficientPermissions'){
|
if(this.state.errors.url.match(/^\/api\/.*Google.*$/m)){
|
||||||
return <Nav.item className='save error' icon='fas fa-exclamation-triangle'>
|
return <Nav.item className='save error' icon='fas fa-exclamation-triangle'>
|
||||||
Oops!
|
Oops!
|
||||||
<div className='errorContainer' onClick={this.clearErrors}>
|
<div className='errorContainer' onClick={this.clearErrors}>
|
||||||
@@ -360,7 +360,7 @@ const EditPage = createClass({
|
|||||||
<a target='_blank' rel='noopener noreferrer'
|
<a target='_blank' rel='noopener noreferrer'
|
||||||
href={`https://www.naturalcrit.com/login?redirect=${this.state.url}`}>
|
href={`https://www.naturalcrit.com/login?redirect=${this.state.url}`}>
|
||||||
<div className='confirm'>
|
<div className='confirm'>
|
||||||
Sign In
|
Go to Log In Page
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
<div className='deny'>
|
<div className='deny'>
|
||||||
|
|||||||
@@ -226,7 +226,7 @@ const NewPage = createClass({
|
|||||||
</Nav.item>;
|
</Nav.item>;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this.state.errors.status == '403' && this.state.errors.response.body.errors[0].reason == 'insufficientPermissions'){
|
if(this.state.errors.url.match(/^\/api\/.*Google.*$/m)){
|
||||||
return <Nav.item className='save error' icon='fas fa-exclamation-triangle'>
|
return <Nav.item className='save error' icon='fas fa-exclamation-triangle'>
|
||||||
Oops!
|
Oops!
|
||||||
<div className='errorContainer' onClick={this.clearErrors}>
|
<div className='errorContainer' onClick={this.clearErrors}>
|
||||||
@@ -237,7 +237,7 @@ const NewPage = createClass({
|
|||||||
<a target='_blank' rel='noopener noreferrer'
|
<a target='_blank' rel='noopener noreferrer'
|
||||||
href={`https://www.naturalcrit.com/login?redirect=${this.state.url}`}>
|
href={`https://www.naturalcrit.com/login?redirect=${this.state.url}`}>
|
||||||
<div className='confirm'>
|
<div className='confirm'>
|
||||||
Sign In
|
Go to Log In Page
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
<div className='deny'>
|
<div className='deny'>
|
||||||
|
|||||||
Reference in New Issue
Block a user