Front: More Typechecks
This commit is contained in:
@@ -10,11 +10,6 @@ type PartitionVisualizerProps = {
|
||||
};
|
||||
|
||||
const PartitionVisualizer = ({ songId }: PartitionVisualizerProps) => {
|
||||
|
||||
|
||||
if (!partitionRessources.data) {
|
||||
return <LoadingView/>;
|
||||
}
|
||||
return <></>;
|
||||
};
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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' }}
|
||||
/>
|
||||
|
||||
@@ -28,6 +28,7 @@ type ScoreViewProps = {
|
||||
good: number;
|
||||
great: number;
|
||||
perfect: number;
|
||||
wrong: number;
|
||||
max_score: number;
|
||||
current_streak: number;
|
||||
max_streak: number;
|
||||
|
||||
@@ -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],
|
||||
|
||||
@@ -154,7 +154,7 @@ const ProfileSettings = ({ navigation }: { navigation: any }) => {
|
||||
disabled: true,
|
||||
data: {
|
||||
value: "default",
|
||||
onValueChange: () => {},
|
||||
onSelect: () => {},
|
||||
options: [
|
||||
{
|
||||
label: "Default",
|
||||
|
||||
Reference in New Issue
Block a user