Skip to content
This repository was archived by the owner on Mar 25, 2023. It is now read-only.

Commit d8285f4

Browse files
On connect page post-login, if embedded, redirect to embedded page
1 parent e05b9a1 commit d8285f4

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

docs/components/ConnectPage/ConnectPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ const ConnectPage = ({
9797
<Box className="left-col">
9898
<h1>Connect Now</h1>
9999
<h2>Compatible with most SQL clients</h2>
100-
<HeroConnectionParams isAuthenticated={isAuthenticated} />
100+
<HeroConnectionParams isAuthenticated={isAuthenticated} embed={embed} />
101101
</Box>
102102
<Box className="right-col">
103103
<Box className="right-top">

docs/components/HeroConnectionParams/HeroConnectionParams.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,19 @@ import {
1414
export interface IHeroConnectionParamsProps {
1515
redirectURL?: string;
1616
isAuthenticated?: boolean;
17+
embed?: boolean;
1718
}
1819

1920
const HeroConnectionParams = ({
2021
redirectURL = "/connect/post-auth-welcome",
2122
isAuthenticated = false,
23+
embed = false,
2224
}: IHeroConnectionParamsProps) => {
25+
if (embed) {
26+
// TODO: Use proper URL building (will break if query params in original URL)
27+
redirectURL = `${redirectURL}?embed=1`;
28+
}
29+
2330
return (
2431
<Box
2532
className="hero-subsection hero-subsection--splitfile hero--connection-params"

0 commit comments

Comments
 (0)