Fix linting issues
This commit is contained in:
@@ -1,33 +1,34 @@
|
|||||||
import React, { PropsWithChildren } from 'react';
|
import React, { PropsWithChildren } from 'react';
|
||||||
import { StyleSheet, View } from 'react-native';
|
import { StyleSheet, View } from 'react-native';
|
||||||
|
|
||||||
export const shadowSmall = StyleSheet.create({
|
export const shadow = StyleSheet.create({
|
||||||
shadowColor: "#000",
|
small: {
|
||||||
shadowOffset: {
|
shadowColor: '#000',
|
||||||
width: 0,
|
shadowOffset: {
|
||||||
height: 2,
|
width: 0,
|
||||||
|
height: 2,
|
||||||
|
},
|
||||||
|
shadowOpacity: 0.1,
|
||||||
|
shadowRadius: 2.62,
|
||||||
|
elevation: 4,
|
||||||
},
|
},
|
||||||
shadowOpacity: 0.1,
|
medium: {
|
||||||
shadowRadius: 2.62,
|
shadowColor: '#000',
|
||||||
elevation: 4,
|
shadowOffset: {
|
||||||
});
|
width: 0,
|
||||||
|
height: 3,
|
||||||
export const shadowMedium = StyleSheet.create({
|
},
|
||||||
shadowColor: "#000",
|
shadowOpacity: 0.1,
|
||||||
shadowOffset: {
|
shadowRadius: 4.65,
|
||||||
width: 0,
|
elevation: 6,
|
||||||
height: 3,
|
}
|
||||||
},
|
|
||||||
shadowOpacity: 0.1,
|
|
||||||
shadowRadius: 4.65,
|
|
||||||
elevation: 6,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
type SizeProp = 'small' | 'medium';
|
type SizeProp = 'small' | 'medium';
|
||||||
|
|
||||||
const shadowMap: Record<SizeProp, StyleSheet.NamedStyles<unknown>> = {
|
const shadowMap: Record<SizeProp, StyleSheet.NamedStyles<unknown>> = {
|
||||||
'small': shadowSmall,
|
'small': shadow.small,
|
||||||
'medium': shadowMedium,
|
'medium': shadow.medium,
|
||||||
};
|
};
|
||||||
|
|
||||||
export const ShadowWrapper = ({ children, size = 'small' }: PropsWithChildren<{ size?: SizeProp }>) => (
|
export const ShadowWrapper = ({ children, size = 'small' }: PropsWithChildren<{ size?: SizeProp }>) => (
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import useDefaultStyles, { ColoredBlurView } from 'components/Colors';
|
|||||||
import { useNavigation } from '@react-navigation/native';
|
import { useNavigation } from '@react-navigation/native';
|
||||||
import { calculateProgressTranslation } from 'components/Progresstrack';
|
import { calculateProgressTranslation } from 'components/Progresstrack';
|
||||||
import { THEME_COLOR } from 'CONSTANTS';
|
import { THEME_COLOR } from 'CONSTANTS';
|
||||||
|
import { MusicNavigationProp } from 'screens/Music/types';
|
||||||
|
|
||||||
const NOW_PLAYING_POPOVER_MARGIN = 6;
|
const NOW_PLAYING_POPOVER_MARGIN = 6;
|
||||||
const NOW_PLAYING_POPOVER_WIDTH = Dimensions.get('screen').width - 2 * NOW_PLAYING_POPOVER_MARGIN;
|
const NOW_PLAYING_POPOVER_WIDTH = Dimensions.get('screen').width - 2 * NOW_PLAYING_POPOVER_MARGIN;
|
||||||
@@ -111,7 +112,7 @@ function NowPlaying() {
|
|||||||
const { index, track } = useCurrentTrack();
|
const { index, track } = useCurrentTrack();
|
||||||
const { buffered, duration, position } = useProgress();
|
const { buffered, duration, position } = useProgress();
|
||||||
const previousIndex = usePrevious(index);
|
const previousIndex = usePrevious(index);
|
||||||
const navigation = useNavigation();
|
const navigation = useNavigation<MusicNavigationProp>();
|
||||||
|
|
||||||
const bufferAnimation = useRef(new Animated.Value(0));
|
const bufferAnimation = useRef(new Animated.Value(0));
|
||||||
const progressAnimation = useRef(new Animated.Value(0));
|
const progressAnimation = useRef(new Animated.Value(0));
|
||||||
|
|||||||
@@ -272,7 +272,7 @@ export default function Search() {
|
|||||||
</View>
|
</View>
|
||||||
</ScrollView> */}
|
</ScrollView> */}
|
||||||
</View>
|
</View>
|
||||||
), [searchTerm, setSearchTerm, defaultStyles, isLoading]);
|
), [searchTerm, setSearchTerm, defaultStyles, isLoading, keyboardHeight]);
|
||||||
|
|
||||||
// GUARD: We cannot search for stuff unless Fuse is loaded with results.
|
// GUARD: We cannot search for stuff unless Fuse is loaded with results.
|
||||||
// Therefore we delay rendering to when we are certain it's there.
|
// Therefore we delay rendering to when we are certain it's there.
|
||||||
|
|||||||
Reference in New Issue
Block a user