Skip to content

Commit

Permalink
fixes pre-order banner for windows users
Browse files Browse the repository at this point in the history
  • Loading branch information
creed-victor committed Feb 5, 2021
1 parent e5b33c8 commit aca83c4
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 2 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions src/app/components/PreOrderBanner/index.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,19 @@
margin: 0 auto;
}

.banner.windows {
background-image: url("./assets/290x90.png");
}

@media screen and (min-width: 576px) {
.banner {
width: 540px;
background-image: url("./assets/540x90.svg");
background-size: 540px 90px;
}
.banner.windows {
background-image: url("./assets/540x90.png");
}
}

@media screen and (min-width: 768px) {
Expand All @@ -20,6 +27,9 @@
background-image: url("./assets/720x90.svg");
background-size: 720px 90px;
}
.banner.windows {
background-image: url("./assets/720x90.png");
}
}

@media screen and (min-width: 992px) {
Expand All @@ -28,6 +38,9 @@
background-image: url("./assets/960x90.svg");
background-size: 960px 90px;
}
.banner.windows {
background-image: url("./assets/960x90.png");
}
}

@media screen and (min-width: 1200px) {
Expand All @@ -36,4 +49,7 @@
background-image: url("./assets/1140x90.svg");
background-size: 1140px 90px;
}
.banner.windows {
background-image: url("./assets/1140x90.png");
}
}
10 changes: 8 additions & 2 deletions src/app/components/PreOrderBanner/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,21 @@
* PreOrderBanner
*
*/
import React from 'react';
import React, { useEffect, useState } from 'react';
import classNames from 'classnames';
import styles from './index.module.css';

export function PreOrderBanner() {
const [isWindow, setIsWindows] = useState(false);
useEffect(() => {
setIsWindows(navigator?.appVersion?.indexOf('Win') !== -1);
}, []);

return (
<div className="row mb-5">
<a
href="https://token.sovryn.app"
className={styles.banner}
className={classNames(styles.banner, isWindow && styles.windows)}
rel="noreferrer noopener"
target="_blank"
>
Expand Down

1 comment on commit aca83c4

@vercel
Copy link

@vercel vercel bot commented on aca83c4 Feb 5, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.