Front: More Typechecks

This commit is contained in:
Arthur Jamet
2023-06-08 12:25:34 +01:00
parent 19ded9ca74
commit d7848692f7
8 changed files with 7 additions and 16 deletions

View File

@@ -10,11 +10,6 @@ type PartitionVisualizerProps = {
};
const PartitionVisualizer = ({ songId }: PartitionVisualizerProps) => {
if (!partitionRessources.data) {
return <LoadingView/>;
}
return <></>;
};

View File

@@ -123,12 +123,7 @@ const Octave = (props: OctaveProps) => {
</Row>
{showOctaveNumber && (
<Text
style={{
userSelect: "none",
WebkitUserSelect: "none",
MozUserSelect: "none",
msUserSelect: "none",
}}
selectable={false}
fontSize="2xs"
color="black"
position="absolute"

View File

@@ -118,7 +118,7 @@ const HomeView = () => {
<TextButton
translate={{ translationKey: 'searchBtn' }}
colorScheme='secondary' size="sm"
onPress={() => navigation.navigate('Search')}
onPress={() => navigation.navigate('Search', {})}
/>
<TextButton translate={{ translationKey: 'settingsBtn' }}
colorScheme='gray' size="sm"

View File

@@ -231,7 +231,7 @@ const PlayView = ({ songId, type, route }: RouteProps<PlayViewProps>) => {
<Animated.View style={{ opacity: fadeAnim }}>
<TextButton
disabled
translate={{ translationKey: lastScoreMessage?.content ?? '' }}
label={lastScoreMessage?.content ?? ''}
colorScheme={lastScoreMessage?.color} rounded='sm'
/>
</Animated.View>

View File

@@ -89,7 +89,7 @@ const ProfileView = () => {
<PlayerStats/>
<Box w="10%" paddingY={10} paddingLeft={5} paddingRight={50} zIndex={1}>
<TextButton
onPress={() => navigation.navigate('Settings', {screen: 'Profile'})}
onPress={() => navigation.navigate('Settings')}
style={{margin: 10}}
translate={{ translationKey: 'settingsBtn' }}
/>

View File

@@ -28,6 +28,7 @@ type ScoreViewProps = {
good: number;
great: number;
perfect: number;
wrong: number;
max_score: number;
current_streak: number;
max_streak: number;

View File

@@ -44,7 +44,7 @@ type SearchViewProps = {
const SearchView = (props: RouteProps<SearchViewProps>) => {
let isRequestSucceeded = false;
const [filter, setFilter] = useState<Filter>("all");
const [stringQuery, setStringQuery] = useState<string>(props.query || "");
const [stringQuery, setStringQuery] = useState<string>(props?.query ?? "");
const { isLoading: isLoadingSong, data: songData = [] } = useQuery(
["song", stringQuery],

View File

@@ -154,7 +154,7 @@ const ProfileSettings = ({ navigation }: { navigation: any }) => {
disabled: true,
data: {
value: "default",
onValueChange: () => {},
onSelect: () => {},
options: [
{
label: "Default",