Skip to content

Commit

Permalink
#1 - Design web, looks good
Browse files Browse the repository at this point in the history
  • Loading branch information
L committed Nov 24, 2021
1 parent 855d957 commit f8b9086
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion packages/components/src/App.web.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,18 @@ import { Provider } from 'react-redux'

import { store } from './store'
import Reviews from './features/reviews/Reviews'
import { useMediaQuery } from 'react-responsive'

type Props = {
children: React.ReactNode
}

const App = ({ children }: Props) => {
const isMobile = useMediaQuery({ maxWidth: 900 })

return (
<Provider store={store}>
<View style={styles.main}>
<View style={[styles.main, isMobile ? mobileStyles.main : {}]}>
<View style={styles.side} />
<View style={styles.pageContainer}>{children}</View>
<View style={styles.side} />
Expand All @@ -26,6 +29,7 @@ const styles = StyleSheet.create({
main: {
backgroundColor: '#f1f1f1',
flexDirection: 'row',
height: '100vh',
},
pageContainer: {
flex: 2,
Expand All @@ -35,4 +39,10 @@ const styles = StyleSheet.create({
},
})

const mobileStyles = StyleSheet.create({
main: {
flexDirection: 'column',
},
})

export default App

0 comments on commit f8b9086

Please sign in to comment.