mirror of
https://github.com/ragestudio/comty.git
synced 2025-07-01 21:34:15 +00:00
13 lines
313 B
JavaScript
Executable File
13 lines
313 B
JavaScript
Executable File
import React from "react"
|
|
|
|
export default (namespace, ctx) => {
|
|
React.useEffect(() => {
|
|
if (app.layout[namespace] === "object") {
|
|
throw new Error(`Layout namespace [${namespace}] already exists`)
|
|
}
|
|
|
|
app.layout[namespace] = ctx
|
|
}, [])
|
|
|
|
return app.layout[namespace]
|
|
} |