Skip to content

Commit 745dbd9

Browse files
committed
1 parent c2fe047 commit 745dbd9

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

src/components/PageLayout/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ const PageLayout: React.FC<React.HTMLAttributes<HTMLDivElement>> = ({
1515
)}
1616
{...props}
1717
>
18-
<div className="relative max-w-4xl w-full bg-background">
19-
<div className="border-l border-r border-gray-200 dark:border-gray-800">
18+
<div className="flex flex-1 relative max-w-4xl w-full bg-background">
19+
<div className="w-full border-l border-r border-gray-200 dark:border-gray-800">
2020
{children}
2121
</div>
2222
</div>

src/pages/Landing/Regular.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ const Page: React.FC = () => {
9797

9898
const surgeHost = getSurgeHost()
9999
const protocol = data.useTls ? 'https:' : 'http:'
100-
let newProfile: any
100+
let newProfile
101101

102102
try {
103103
const res = await tryHost(protocol, data.host, data.port, data.key)

src/pages/Landing/utils.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,21 @@ export const getSurgeHost = (): {
5050
hostname: string
5151
port: string
5252
} => {
53-
const protocol = window.location.protocol
53+
if (process.env.NODE_ENV !== 'production') {
54+
const protocol = window.location.protocol
55+
const port = window.location.port
56+
? window.location.port
57+
: protocol === 'https:'
58+
? '443'
59+
: '80'
5460

55-
if (process.env.NODE_ENV === 'production') {
5661
return {
5762
protocol,
5863
hostname: window.location.hostname,
59-
port: window.location.port,
64+
port,
6065
}
6166
}
67+
6268
return {
6369
protocol: process.env.REACT_APP_PROTOCOL as string,
6470
hostname: process.env.REACT_APP_HOST as string,

0 commit comments

Comments
 (0)