Skip to content

Commit 834f68f

Browse files
Update PageLayout.tsx
1 parent 83073de commit 834f68f

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

frontend/src/components/Layout/PageLayout.tsx

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const GCSModal = lazy(() => import('../DataSources/GCS/GCSModal'));
2323
const S3Modal = lazy(() => import('../DataSources/AWS/S3Modal'));
2424
const GenericModal = lazy(() => import('../WebSources/GenericSourceModal'));
2525
const ConnectionModal = lazy(() => import('../Popups/ConnectionModal/ConnectionModal'));
26-
26+
import { SKIP_AUTH } from '../../utils/Constants';
2727
const spotlightsforunauthenticated = [
2828
{
2929
target: 'loginbutton',
@@ -280,7 +280,7 @@ const PageLayout: React.FC = () => {
280280
setActiveSpotlight('loginbutton');
281281
}
282282

283-
if (isAuthenticated && isFirstTimeUser) {
283+
if ((isAuthenticated || SKIP_AUTH) && isFirstTimeUser) {
284284
setActiveSpotlight('connectbutton');
285285
}
286286
}, [isAuthenticated]);
@@ -319,7 +319,13 @@ const PageLayout: React.FC = () => {
319319

320320
return (
321321
<>
322-
{!isAuthenticated && isFirstTimeUser && (
322+
{/* {!isAuthenticated && isFirstTimeUser && (
323+
324+
)}
325+
{isAuthenticated && isFirstTimeUser && (
326+
327+
)} */}
328+
{!isAuthenticated && !SKIP_AUTH && isFirstTimeUser ? (
323329
<SpotlightTour
324330
spotlights={spotlightsforunauthenticated}
325331
onAction={(target, action) => {
@@ -334,8 +340,7 @@ const PageLayout: React.FC = () => {
334340
console.log(`Action ${action} was performed in spotlight ${target}`);
335341
}}
336342
/>
337-
)}
338-
{isAuthenticated && isFirstTimeUser && (
343+
) : isAuthenticated || (SKIP_AUTH && isFirstTimeUser) ? (
339344
<SpotlightTour
340345
spotlights={spotlights}
341346
onAction={(target, action) => {
@@ -350,7 +355,7 @@ const PageLayout: React.FC = () => {
350355
console.log(`Action ${action} was performed in spotlight ${target}`);
351356
}}
352357
/>
353-
)}
358+
) : null}
354359

355360
<Suspense fallback={<FallBackDialog />}>
356361
<ConnectionModal

0 commit comments

Comments
 (0)