eletrotupi / tcc/ commit / 474ef7d

frontend: yeet ios stuff

Pedro Lucas Porcellis porcellis@eletrotupi.com · 5 months ago 474ef7db81e944acfac91af1adbbb029cb9cd6d9 Browse files
Parents b4d6814
Changed files
2
Additions
0
Deletions
-36
frontend/components/misc/haptic-tab.tsx
1 1
import { BottomTabBarButtonProps } from '@react-navigation/bottom-tabs';
2 2
import { PlatformPressable } from '@react-navigation/elements';
3 3
import * as Haptics from 'expo-haptics';
4 4

5 5
export function HapticTab(props: BottomTabBarButtonProps) {
6 6
  return (
7 7
    <PlatformPressable
8 8
      {...props}
9 9
      onPressIn={(ev) => {
10 -
        if (process.env.EXPO_OS === 'ios') {
11 -
          // Add a soft haptic feedback when pressing down on the tabs.
12 -
          Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Light);
13 -
        }
14 10
        props.onPressIn?.(ev);
15 11
      }}
16 12
    />
17 13
  );
18 14
}
frontend/components/ui/icon-symbol.ios.tsx → /dev/null
1 -
import { SymbolView, SymbolViewProps, SymbolWeight } from 'expo-symbols';
2 -
import { StyleProp, ViewStyle } from 'react-native';
3 -

4 -
export function IconSymbol({
5 -
  name,
6 -
  size = 24,
7 -
  color,
8 -
  style,
9 -
  weight = 'regular',
10 -
}: {
11 -
  name: SymbolViewProps['name'];
12 -
  size?: number;
13 -
  color: string;
14 -
  style?: StyleProp<ViewStyle>;
15 -
  weight?: SymbolWeight;
16 -
}) {
17 -
  return (
18 -
    <SymbolView
19 -
      weight={weight}
20 -
      tintColor={color}
21 -
      resizeMode="scaleAspectFit"
22 -
      name={name}
23 -
      style={[
24 -
        {
25 -
          width: size,
26 -
          height: size,
27 -
        },
28 -
        style,
29 -
      ]}
30 -
    />
31 -
  );
32 -
}