[FIX] Reviwed comments on the RP

This commit is contained in:
mathysPaul
2023-11-17 13:19:39 +01:00
parent 9882fd240e
commit c91bbfd2f1
6 changed files with 28 additions and 24 deletions

View File

@@ -66,7 +66,9 @@ export class ValidationError extends Error {
export default class API {
public static readonly baseUrl =
Platform.OS === 'web' ? '/api' : process.env.EXPO_PUBLIC_API_URL!;
process.env.NODE_ENV != 'development' && Platform.OS === 'web'
? '/api'
: 'https://nightly.chroma.octohub.app/api';
public static async fetch(
params: FetchParams,
handle: Pick<Required<HandleParams>, 'raw'>

View File

@@ -222,7 +222,7 @@ const IconButton: React.FC<IconButtonProps> = ({
return (
<TouchableOpacity activeOpacity={1} onPress={toggleState} style={combinedContainerStyle}>
{IconActive && (
<Animated.View
<Animated.Text
style={[
{
padding: padding,
@@ -238,9 +238,9 @@ const IconButton: React.FC<IconButtonProps> = ({
]}
>
<IconActive size={size} variant={activeVariant} />
</Animated.View>
</Animated.Text>
)}
<Animated.View
<Animated.Text
style={[
{
padding: padding,
@@ -253,7 +253,7 @@ const IconButton: React.FC<IconButtonProps> = ({
]}
>
<Icon size={size} variant={variant} />
</Animated.View>
</Animated.Text>
</TouchableOpacity>
);
};

View File

@@ -4,6 +4,19 @@ import { Animated, StyleSheet, Pressable, ViewStyle, StyleProp } from 'react-nat
type StyleObject = Record<string, any>;
type InterpolatedStyleObject = Record<string, Animated.AnimatedInterpolation<any>>;
const TRANSFORM_WHITELIST = {
translateX: true,
translateY: true,
scale: true,
scaleX: true,
scaleY: true,
rotate: true,
rotateX: true,
rotateY: true,
rotateZ: true,
perspective: true,
};
interface InteractiveCCProps {
defaultStyle: StyleObject;
hoverStyle: StyleObject;

View File

@@ -1,6 +1,6 @@
import React, { useRef } from 'react';
import { TouchableOpacity, Animated, StyleSheet, Platform } from 'react-native';
import { Column, Text, useTheme } from 'native-base';
import { Animated, StyleSheet, Platform } from 'react-native';
import { Column, Pressable, Text, useTheme } from 'native-base';
interface LinkBaseProps {
text: string;
@@ -49,13 +49,13 @@ const LinkBase: React.FC<LinkBaseProps> = ({ text, onPress }) => {
};
return (
<TouchableOpacity
<Pressable
style={styles.container}
onPress={onPress}
onPressIn={handlePressIn}
onPressOut={handlePressOut}
onMouseEnter={handleMouseEnter}
onMouseLeave={handleMouseLeave}
onHoverIn={handleMouseEnter}
onHoverOut={handleMouseLeave}
>
<Column>
<Text>{text}</Text>
@@ -70,7 +70,7 @@ const LinkBase: React.FC<LinkBaseProps> = ({ text, onPress }) => {
]}
/>
</Column>
</TouchableOpacity>
</Pressable>
);
};

View File

@@ -1,11 +1,4 @@
import { useBreakpointValue } from 'native-base';
import { View } from 'react-native';
import TabNavigationDesktop from './TabNavigationDesktop';
import TabNavigationPhone from './TabNavigationPhone';
import { Ionicons } from '@expo/vector-icons';
import React, { useState } from 'react';
import useColorScheme from '../../hooks/colorScheme';
import HomeView from '../../views/V2/DiscoveryView';
import React from 'react';
export type NaviTab = {
id: string;
@@ -17,4 +10,3 @@ export type NaviTab = {
isCollapsed?: boolean;
iconName?: string;
};

View File

@@ -156,10 +156,7 @@ const ProfileSettings = () => {
},
]}
/>
<LogoutButtonCC
isGuest={user.isGuest}
buttonType={'filled'}
/>
<LogoutButtonCC isGuest={user.isGuest} buttonType={'filled'} />
</Column>
);
};