improved large album/playlist performance

switched to flatlist for all of those
This commit is contained in:
austinried
2021-08-25 16:13:35 +09:00
parent f3eac6102a
commit d49c97c2b5
13 changed files with 210 additions and 140 deletions
+15 -2
View File
@@ -3,14 +3,27 @@ import { useWindowDimensions, ViewStyle } from 'react-native'
import LinearGradient from 'react-native-linear-gradient'
import colorStyles from '@app/styles/colors'
const GradientBackground: React.FC<{
export type GradientBackgroundPropsBase = {
height?: number | string
width?: number | string
position?: 'relative' | 'absolute'
style?: ViewStyle
}
export type GradientBackgroundProps = GradientBackgroundPropsBase & {
colors?: string[]
locations?: number[]
}> = ({ height, width, position, style, colors, locations, children }) => {
}
const GradientBackground: React.FC<GradientBackgroundProps> = ({
height,
width,
position,
style,
colors,
locations,
children,
}) => {
const layout = useWindowDimensions()
return (