Minor app.jsx fix
This commit is contained in:
+42
-31
@@ -56,10 +56,9 @@ if (window.location.port === "3000") {
|
|||||||
|
|
||||||
// Development on Github Codespaces
|
// Development on Github Codespaces
|
||||||
if (globalUrl.includes("app.github.dev")) {
|
if (globalUrl.includes("app.github.dev")) {
|
||||||
globalUrl = globalUrl.replace("-3001", "-5001")
|
globalUrl = globalUrl.replace("-3000.", "-5001.")
|
||||||
//globalUrl = "https://frikky-shuffle-5gvr4xx62w64-5001.preview.app.github.dev"
|
globalUrl = globalUrl.replace("-3001.", "-5001.")
|
||||||
}
|
}
|
||||||
//console.log("global: ", globalUrl)
|
|
||||||
|
|
||||||
const App = (message, props) => {
|
const App = (message, props) => {
|
||||||
|
|
||||||
@@ -69,6 +68,7 @@ const App = (message, props) => {
|
|||||||
const [isLoggedIn, setIsLoggedIn] = useState(false)
|
const [isLoggedIn, setIsLoggedIn] = useState(false)
|
||||||
const [dataset, setDataset] = useState(false)
|
const [dataset, setDataset] = useState(false)
|
||||||
const [isLoaded, setIsLoaded] = useState(false)
|
const [isLoaded, setIsLoaded] = useState(false)
|
||||||
|
const [modalOpen, setModalOpen] = useState(false)
|
||||||
const [curpath, setCurpath] = useState(typeof window === "undefined" || window.location === undefined ? "" : window.location.pathname)
|
const [curpath, setCurpath] = useState(typeof window === "undefined" || window.location === undefined ? "" : window.location.pathname)
|
||||||
|
|
||||||
|
|
||||||
@@ -177,34 +177,45 @@ const App = (message, props) => {
|
|||||||
curpath={curpath}
|
curpath={curpath}
|
||||||
setCurpath={setCurpath}
|
setCurpath={setCurpath}
|
||||||
/>
|
/>
|
||||||
{!isLoaded ? null :
|
{!isLoaded ? null :
|
||||||
userdata.chat_disabled === true ? null :
|
userdata.chat_disabled === true ? null :
|
||||||
<Drift
|
<Drift
|
||||||
appId="zfk9i7w3yizf"
|
appId="zfk9i7w3yizf"
|
||||||
attributes={{
|
attributes={{
|
||||||
name: userdata.username === undefined || userdata.username === null ? "OSS user" : `OSS ${userdata.username}`,
|
name: userdata.username === undefined || userdata.username === null ? "OSS user" : `OSS ${userdata.username}`,
|
||||||
}}
|
}}
|
||||||
eventHandlers={[
|
eventHandlers={[
|
||||||
{
|
{
|
||||||
event: "conversation:firstInteraction",
|
event: "conversation:firstInteraction",
|
||||||
function: handleFirstInteraction
|
function: handleFirstInteraction
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
<Header
|
|
||||||
notifications={notifications}
|
<div style={{ minHeight: 68, maxHeight: 68, }}>
|
||||||
setNotifications={setNotifications}
|
<Header
|
||||||
checkLogin={checkLogin}
|
notifications={notifications}
|
||||||
cookies={cookies}
|
setNotifications={setNotifications}
|
||||||
removeCookie={removeCookie}
|
checkLogin={checkLogin}
|
||||||
isLoaded={isLoaded}
|
cookies={cookies}
|
||||||
globalUrl={globalUrl}
|
removeCookie={removeCookie}
|
||||||
setIsLoggedIn={setIsLoggedIn}
|
isLoaded={isLoaded}
|
||||||
isLoggedIn={isLoggedIn}
|
globalUrl={globalUrl}
|
||||||
userdata={userdata}
|
setIsLoggedIn={setIsLoggedIn}
|
||||||
{...props}
|
isLoggedIn={isLoggedIn}
|
||||||
/>
|
userdata={userdata}
|
||||||
|
|
||||||
|
setModalOpen={setModalOpen}
|
||||||
|
modalOpen={modalOpen}
|
||||||
|
curpath={curpath}
|
||||||
|
serverside={false}
|
||||||
|
isMobile={false}
|
||||||
|
|
||||||
|
{...props}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
{/*
|
{/*
|
||||||
<div style={{ height: 60 }} />
|
<div style={{ height: 60 }} />
|
||||||
*/}
|
*/}
|
||||||
|
|||||||
Reference in New Issue
Block a user