Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
geekdada committed Sep 19, 2023
1 parent c2fe047 commit 745dbd9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/components/PageLayout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ const PageLayout: React.FC<React.HTMLAttributes<HTMLDivElement>> = ({
)}
{...props}
>
<div className="relative max-w-4xl w-full bg-background">
<div className="border-l border-r border-gray-200 dark:border-gray-800">
<div className="flex flex-1 relative max-w-4xl w-full bg-background">
<div className="w-full border-l border-r border-gray-200 dark:border-gray-800">
{children}
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Landing/Regular.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ const Page: React.FC = () => {

const surgeHost = getSurgeHost()
const protocol = data.useTls ? 'https:' : 'http:'
let newProfile: any
let newProfile

try {
const res = await tryHost(protocol, data.host, data.port, data.key)
Expand Down
12 changes: 9 additions & 3 deletions src/pages/Landing/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,21 @@ export const getSurgeHost = (): {
hostname: string
port: string
} => {
const protocol = window.location.protocol
if (process.env.NODE_ENV !== 'production') {
const protocol = window.location.protocol
const port = window.location.port
? window.location.port
: protocol === 'https:'
? '443'
: '80'

if (process.env.NODE_ENV === 'production') {
return {
protocol,
hostname: window.location.hostname,
port: window.location.port,
port,
}
}

return {
protocol: process.env.REACT_APP_PROTOCOL as string,
hostname: process.env.REACT_APP_HOST as string,
Expand Down

0 comments on commit 745dbd9

Please sign in to comment.