Skip to content

Commit

Permalink
fix broken links
Browse files Browse the repository at this point in the history
  • Loading branch information
simke9445 committed Oct 30, 2023
1 parent c849e70 commit eae9157
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
10 changes: 8 additions & 2 deletions apps/warp-protocol-landing/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ import Brand from 'pages/brand/Brand';

export const APP_URL = 'https://app.warp.money';

function baseUrl(url: string) {
const parsedUrl = new URL(url);
let baseUrl = parsedUrl.origin;
return baseUrl;
}

const App = () => {
const topBarRef = useRef<HTMLDivElement>(null);
const featuresRef = useRef<HTMLDivElement>(null);
Expand Down Expand Up @@ -58,11 +64,11 @@ const App = () => {
}, []);

const onPrivacyPolicyClick = useCallback(() => {
window.open(`${document.location.href}pdfs/privacy_policy.pdf`);
window.open(`${baseUrl(document.location.href)}/pdfs/privacy_policy.pdf`);
}, []);

const onTermsClick = useCallback(() => {
window.open(`${document.location.href}pdfs/terms_of_use.pdf`);
window.open(`${baseUrl(document.location.href)}/pdfs/terms_of_use.pdf`);
}, []);

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ type DesktopBottomBarProps = UIElementProps & {
export const DesktopBottomBar = (props: DesktopBottomBarProps) => {
const {
onHomeClick,
onFeaturesClick,
className,
onDocsClick,
onContactClick,
Expand All @@ -49,14 +48,6 @@ export const DesktopBottomBar = (props: DesktopBottomBarProps) => {
>
Home
</Button>
<Button
className={classNames(styles.button, styles.btn_gray)}
variant="primary"
fill="none"
onClick={onFeaturesClick}
>
Features
</Button>
<Button
className={classNames(styles.button, styles.btn_gray)}
variant="primary"
Expand Down

0 comments on commit eae9157

Please sign in to comment.