mirror of
https://github.com/ragestudio/comty.git
synced 2025-07-08 16:54:15 +00:00
format
This commit is contained in:
parent
dd2e1b5070
commit
44c2500491
@ -23,9 +23,7 @@ export default class Layout extends React.PureComponent {
|
||||
const transitionLayer = document.getElementById("transitionLayer")
|
||||
|
||||
if (!transitionLayer) {
|
||||
console.warn(
|
||||
"transitionLayer not found, no animation will be played",
|
||||
)
|
||||
console.warn("transitionLayer not found, no animation will be played")
|
||||
return false
|
||||
}
|
||||
|
||||
@ -42,9 +40,7 @@ export default class Layout extends React.PureComponent {
|
||||
const transitionLayer = document.getElementById("transitionLayer")
|
||||
|
||||
if (!transitionLayer) {
|
||||
console.warn(
|
||||
"transitionLayer not found, no animation will be played",
|
||||
)
|
||||
console.warn("transitionLayer not found, no animation will be played")
|
||||
return false
|
||||
}
|
||||
|
||||
@ -114,10 +110,7 @@ export default class Layout extends React.PureComponent {
|
||||
)
|
||||
},
|
||||
toggleMobileStyle: (to) => {
|
||||
return this.layoutInterface.toggleRootContainerClassname(
|
||||
"mobile",
|
||||
to,
|
||||
)
|
||||
return this.layoutInterface.toggleRootContainerClassname("mobile", to)
|
||||
},
|
||||
toggleReducedAnimations: (to) => {
|
||||
return this.layoutInterface.toggleRootContainerClassname(
|
||||
@ -157,10 +150,7 @@ export default class Layout extends React.PureComponent {
|
||||
return false
|
||||
}
|
||||
|
||||
to =
|
||||
typeof to === "boolean"
|
||||
? to
|
||||
: !root.classList.contains(classname)
|
||||
to = typeof to === "boolean" ? to : !root.classList.contains(classname)
|
||||
|
||||
if (root.classList.contains(classname) === to) {
|
||||
// ignore
|
||||
@ -208,10 +198,9 @@ export default class Layout extends React.PureComponent {
|
||||
|
||||
if (this.state.renderError) {
|
||||
if (this.props.staticRenders?.RenderError) {
|
||||
return React.createElement(
|
||||
this.props.staticRenders?.RenderError,
|
||||
{ error: this.state.renderError },
|
||||
)
|
||||
return React.createElement(this.props.staticRenders?.RenderError, {
|
||||
error: this.state.renderError,
|
||||
})
|
||||
}
|
||||
|
||||
return JSON.stringify(this.state.renderError)
|
||||
|
Loading…
x
Reference in New Issue
Block a user