Skip to content

Commit

Permalink
fix: mobile tweaks (#1260)
Browse files Browse the repository at this point in the history
  • Loading branch information
tyleroooo authored Nov 7, 2024
1 parent 45daeb0 commit 38a1553
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions public/smartbanner.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<meta name="smartbanner:button" content="VIEW">
<meta name="smartbanner:close-label" content="Close">
<meta name="smartbanner:exclude-user-agent-regex" content="^.*(Windows NT|Intel Mac OS X).*$">
<meta name="smartbanner:disable-positioning" content="true" />
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/smartbanner.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/smartbanner.min.css" rel="stylesheet">
<!-- Smartbanner: End configuration -->
6 changes: 3 additions & 3 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ const Content = () => {
isShowingFooter={isShowingFooter}
showRestrictionWarning={showRestrictionWarning}
>
{isNotTablet && <HeaderDesktop />}
{isShowingHeader && <HeaderDesktop />}
{showRestrictionWarning && <RestrictionWarning />}
<$Main>
<Suspense fallback={<LoadingSpace id="main" />}>
Expand Down Expand Up @@ -310,9 +310,9 @@ const $Content = styled.div<{
${layoutMixins.withOuterAndInnerBorders}
display: grid;
${({ showRestrictionWarning }) => css`
${({ showRestrictionWarning, isShowingHeader }) => css`
grid-template:
'Header' var(--page-currentHeaderHeight)
${isShowingHeader ? css`'Header' var(--page-currentHeaderHeight)` : ''}
${showRestrictionWarning ? css`'RestrictionWarning' min-content` : ''}
'Main' minmax(min-content, 1fr)
'Footer' var(--page-currentFooterHeight)
Expand Down
3 changes: 2 additions & 1 deletion src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ b {
}

/* Fixes the smart banner being unclickable. We want this to rise above all app banners */
.smartbanner--ios {
.smartbanner--ios,
.smartbanner--android {
z-index: 999;
}
4 changes: 3 additions & 1 deletion src/views/MarketsStats.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import tw from 'twin.macro';
import { STRING_KEYS } from '@/constants/localization';
import { MarketFilters, MarketSorting } from '@/constants/markets';

import { useBreakpoints } from '@/hooks/useBreakpoints';
import { useMarketsData } from '@/hooks/useMarketsData';
import { useStringGetter } from '@/hooks/useStringGetter';

Expand All @@ -32,12 +33,13 @@ export const MarketsStats = (props: MarketsStatsProps) => {
hideUnlaunchedMarkets: true,
});

const { isTablet } = useBreakpoints();
return (
<section
className={className}
tw="grid auto-cols-fr grid-flow-col gap-1 tablet:column desktopSmall:pl-1 desktopSmall:pr-1"
>
<ExchangeBillboards />
{!isTablet && <ExchangeBillboards />}
{hasNewMarkets && (
<$Section>
<$SectionHeader>
Expand Down

0 comments on commit 38a1553

Please sign in to comment.