Skip to content

Commit

Permalink
fix for safari browser rendering (#179)
Browse files Browse the repository at this point in the history
Co-authored-by: LewisB <[email protected]>
  • Loading branch information
krisbitney and L03TJ3 authored Feb 8, 2024
1 parent 19ef5fc commit df059f0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/app/src/components/ImpactButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const styles = StyleSheet.create({
backgroundColor: Colors.purple[200],
color: Colors.purple[100],
position: 'absolute',
bottom: 5,
bottom: 0,
paddingVertical: 8,
},
desktopButton: {
Expand Down
10 changes: 6 additions & 4 deletions packages/app/src/components/Layout/Layout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ReactNode } from 'react';
import Header from '../Header/Header';
import { Platform, ScrollView, StyleSheet, useWindowDimensions, View } from 'react-native';
import { Platform, ScrollView, StyleSheet, View } from 'react-native';
import ImpactButton from '../ImpactButton';
import { useLocation } from 'react-router-native';
import { Colors } from '../../utils/colors';
Expand All @@ -9,15 +9,17 @@ import { useMediaQuery } from 'native-base';
import useCrossNavigate from '../../routes/useCrossNavigate';
import Breadcrumb, { BreadcrumbPathEntry } from './Breadcrumb';
import { DesktopPageContentContainer } from './DesktopPageContentContainer';
import { useSafeAreaFrame } from 'react-native-safe-area-context';

interface LayoutProps {
children: ReactNode;
breadcrumbPath?: BreadcrumbPathEntry[];
}

function Layout({ children, breadcrumbPath }: LayoutProps) {
const windowDimensions = useWindowDimensions();
const scrollViewHeight = windowDimensions.height - 100;
const { height: safeAreaHeight } = useSafeAreaFrame();
const scrollViewHeight = safeAreaHeight - 105;

const { address } = useAccount();
const [isDesktopResolution] = useMediaQuery({
minWidth: 920,
Expand All @@ -36,7 +38,7 @@ function Layout({ children, breadcrumbPath }: LayoutProps) {

const scrollViewStyles = [
styles.scrollView,
{ maxHeight: scrollViewHeight },
{ maxHeight: scrollViewHeight, minHeight: scrollViewHeight },
{ paddingBottom: isCollectivePage ? 61 : 0 },
];

Expand Down

0 comments on commit df059f0

Please sign in to comment.