[FIX] Reviwed comments on the RP
This commit is contained in:
@@ -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'>
|
||||
|
||||
@@ -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>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
@@ -156,10 +156,7 @@ const ProfileSettings = () => {
|
||||
},
|
||||
]}
|
||||
/>
|
||||
<LogoutButtonCC
|
||||
isGuest={user.isGuest}
|
||||
buttonType={'filled'}
|
||||
/>
|
||||
<LogoutButtonCC isGuest={user.isGuest} buttonType={'filled'} />
|
||||
</Column>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user