Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,17 @@ const Layout = ({ appsInfoQuery }) => {
sessionCookie?.serverTime &&
systemInfo?.sessionTimeout

const appInfoQueryReady = Boolean(appsInfoQuery?.data)
return (
<div className={styles.container}>
{supportsSessionHandler && (
<SessionHandler
sessionTimeoutInSeconds={systemInfo?.sessionTimeout}
/>
)}
<ConnectedHeaderBar appsInfoQuery={appsInfoQuery} />
{appInfoQueryReady && (
<ConnectedHeaderBar appsInfoQuery={appsInfoQuery} />
)}
{/* Skip the routes in dev; they don't make the same sense */}
{process.env.NODE_ENV !== 'development' ? <Outlet /> : null}
</div>
Expand Down
4 changes: 3 additions & 1 deletion src/components/ConnectedHeaderbar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@ export function ConnectedHeaderBar({ appsInfoQuery }) {
? selfPWAUpdateState
: clientPWAUpdateState

const bgColor = appsInfoQuery?.data?.systemSettings.keyCustomColor
const bgColor =
appsInfoQuery?.data?.systemSettings.keyCustomColor || '#165c92'

const color = useMemo(() => getContrastingColor(bgColor), [bgColor])

const colorProviderProps = bgColor ? { bgColor, color } : {}
Expand Down
1 change: 0 additions & 1 deletion src/components/header-bar/header-bar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ export const HeaderBar = ({
flex-direction: row;
align-items: center;
justify-content: space-between;
background-color: #165c92;
color: ${colors.white};
height: 40px;
}
Expand Down
Loading