mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 18:44:16 +00:00
avoid render layout if renderLock
is enabled
This commit is contained in:
parent
b9f3be87dd
commit
df3d76ac8b
@ -103,6 +103,12 @@ export default class Layout extends React.Component {
|
||||
|
||||
const currentRoute = window.location.pathname
|
||||
|
||||
if (this.state.renderLock) {
|
||||
return <>
|
||||
{InitializationComponent}
|
||||
</>
|
||||
}
|
||||
|
||||
if (!this.props.user && currentRoute !== config.app?.authPath && currentRoute !== "/") {
|
||||
const isPublicRoute = publicRoutes.some((route) => {
|
||||
const regex = new RegExp(route.replace("*", ".*"))
|
||||
@ -171,7 +177,7 @@ export default class Layout extends React.Component {
|
||||
}
|
||||
|
||||
return <Layout {...layoutComponentProps}>
|
||||
{this.state.renderLock ? InitializationComponent : this.props.children}
|
||||
{this.props.children}
|
||||
</Layout>
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user