Skip to content

Commit

Permalink
refactor: optimize ScrollView layout in Player component
Browse files Browse the repository at this point in the history
  • Loading branch information
thoulee21 committed Sep 30, 2024
1 parent 3f851f4 commit ed03260
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/pages/player.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import {
BottomBar,
PlayControls,
Progress,
Spacer,
TrackInfo,
TrackListSheet,
} from '../components';
Expand Down Expand Up @@ -104,13 +103,13 @@ export function Player() {
}
/>

<ScrollView style={styles.screenContainer}>
<Spacer />
<ScrollView
style={styles.screen}
contentContainerStyle={styles.screenContainer}
>
<TrackInfo />
<Progress />
<Spacer />
<PlayControls />
<Spacer mode="expand" />
</ScrollView>

<BottomBar bottomSheetRef={bottomSheetRef} />
Expand All @@ -123,10 +122,14 @@ export function Player() {
}

const styles = StyleSheet.create({
screenContainer: {
screen: {
display: 'flex',
flex: 1,
},
screenContainer: {
flex: 1,
justifyContent: 'space-between',
},
searchbar: {
margin: 10,
backgroundColor: 'transparent',
Expand Down

0 comments on commit ed03260

Please sign in to comment.