From c91bbfd2f1d425b24458ec97256a4074eea18560 Mon Sep 17 00:00:00 2001 From: mathysPaul Date: Fri, 17 Nov 2023 13:19:39 +0100 Subject: [PATCH] [FIX] Reviwed comments on the RP --- front/API.ts | 4 +++- front/components/UI/IconButton.tsx | 8 ++++---- front/components/UI/InteractiveCC.tsx | 13 +++++++++++++ front/components/UI/LinkBase.tsx | 12 ++++++------ front/components/V2/TabNavigation.tsx | 10 +--------- front/views/settings/SettingsProfile.tsx | 5 +---- 6 files changed, 28 insertions(+), 24 deletions(-) diff --git a/front/API.ts b/front/API.ts index 5254500..5dcf445 100644 --- a/front/API.ts +++ b/front/API.ts @@ -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, 'raw'> diff --git a/front/components/UI/IconButton.tsx b/front/components/UI/IconButton.tsx index 4c18aa0..d20f8fa 100644 --- a/front/components/UI/IconButton.tsx +++ b/front/components/UI/IconButton.tsx @@ -222,7 +222,7 @@ const IconButton: React.FC = ({ return ( {IconActive && ( - = ({ ]} > - + )} - = ({ ]} > - + ); }; diff --git a/front/components/UI/InteractiveCC.tsx b/front/components/UI/InteractiveCC.tsx index 82e15ce..56d1806 100644 --- a/front/components/UI/InteractiveCC.tsx +++ b/front/components/UI/InteractiveCC.tsx @@ -4,6 +4,19 @@ import { Animated, StyleSheet, Pressable, ViewStyle, StyleProp } from 'react-nat type StyleObject = Record; type InterpolatedStyleObject = Record>; +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; diff --git a/front/components/UI/LinkBase.tsx b/front/components/UI/LinkBase.tsx index 8673094..105ae73 100644 --- a/front/components/UI/LinkBase.tsx +++ b/front/components/UI/LinkBase.tsx @@ -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 = ({ text, onPress }) => { }; return ( - {text} @@ -70,7 +70,7 @@ const LinkBase: React.FC = ({ text, onPress }) => { ]} /> - + ); }; diff --git a/front/components/V2/TabNavigation.tsx b/front/components/V2/TabNavigation.tsx index d1fd52d..2ba27e7 100644 --- a/front/components/V2/TabNavigation.tsx +++ b/front/components/V2/TabNavigation.tsx @@ -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; }; - diff --git a/front/views/settings/SettingsProfile.tsx b/front/views/settings/SettingsProfile.tsx index cd01c63..89854d9 100644 --- a/front/views/settings/SettingsProfile.tsx +++ b/front/views/settings/SettingsProfile.tsx @@ -156,10 +156,7 @@ const ProfileSettings = () => { }, ]} /> - + ); };