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
17 changes: 15 additions & 2 deletions ui/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Suspense } from 'react';
import { Suspense, useEffect } from 'react';
import { Provider } from 'react-redux';
import { PersistGate } from 'redux-persist/integration/react';
import { FullPageLoader } from '@contentstack/venus-components';
Expand All @@ -18,6 +18,20 @@ import { useNetworkCheck } from './components/NetworkProvider';
function App() {
const isOnline = useNetworkCheck();

useEffect(() => {
const selectModal = document.querySelector('.ReactModalPortal');

if (selectModal instanceof HTMLElement) {
if (!isOnline) {
// Hide the modal by setting display to none
selectModal.style.display = 'none';
} else {
// Show the modal by setting display to block
selectModal.style.display = 'block';
}
}
}, [isOnline]);

return (
<>
{isOnline ? (
Expand All @@ -38,5 +52,4 @@ function App() {
</>
);
}

export default App;
1 change: 1 addition & 0 deletions ui/src/components/DestinationStack/DestinationStack.scss
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
background-color: $color-brand-white-base;
.description {
line-height: 24px;
font-family: $font-family-primary;
}
.step_block {
padding: 0 !important;
Expand Down