mirror of
https://github.com/movie-web/native-app.git
synced 2025-09-13 18:13:25 +00:00
[fix] fix comments on PR
This commit is contained in:
@@ -1,31 +1,9 @@
|
|||||||
import FontAwesome from '@expo/vector-icons/FontAwesome';
|
|
||||||
import { Tabs } from 'expo-router';
|
import { Tabs } from 'expo-router';
|
||||||
import { StyleProp, TextStyle } from 'react-native';
|
|
||||||
|
|
||||||
import Colors from '../../constants/Colors';
|
import Colors from '../../constants/Colors';
|
||||||
|
import TabBarIcon from '../../components/TabBarIcon';
|
||||||
import { globalStyles } from '../../styles/global';
|
import { globalStyles } from '../../styles/global';
|
||||||
|
|
||||||
/**
|
|
||||||
* You can explore the built-in icon families and icons on the web at https://icons.expo.fyi/
|
|
||||||
*/
|
|
||||||
function TabBarIcon(props: {
|
|
||||||
name: React.ComponentProps<typeof FontAwesome>['name'];
|
|
||||||
color?: string;
|
|
||||||
focused?: boolean;
|
|
||||||
style?: StyleProp<TextStyle>;
|
|
||||||
}) {
|
|
||||||
return (
|
|
||||||
<FontAwesome
|
|
||||||
color={
|
|
||||||
props.color ||
|
|
||||||
(props.focused ? Colors.dark.purple300 : Colors.dark.shade300)
|
|
||||||
}
|
|
||||||
size={24}
|
|
||||||
{...props}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export default function TabLayout() {
|
export default function TabLayout() {
|
||||||
return (
|
return (
|
||||||
<Tabs
|
<Tabs
|
||||||
@@ -68,7 +46,7 @@ export default function TabLayout() {
|
|||||||
options={{
|
options={{
|
||||||
title: 'About',
|
title: 'About',
|
||||||
tabBarIcon: ({ focused }) => (
|
tabBarIcon: ({ focused }) => (
|
||||||
<TabBarIcon name="500px" focused={focused} />
|
<TabBarIcon name="info-circle" focused={focused} />
|
||||||
),
|
),
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
@@ -4,7 +4,7 @@ import ScreenLayout from '../../components/layout/screenLayout';
|
|||||||
import { globalStyles } from '../../styles/global';
|
import { globalStyles } from '../../styles/global';
|
||||||
import { RegularText } from '../../components/Styled';
|
import { RegularText } from '../../components/Styled';
|
||||||
|
|
||||||
export default function TabTwoScreen() {
|
export default function AboutScreen() {
|
||||||
return (
|
return (
|
||||||
<ScreenLayout
|
<ScreenLayout
|
||||||
title="About"
|
title="About"
|
||||||
|
@@ -1,19 +0,0 @@
|
|||||||
import { StyleSheet, Text, View } from 'react-native';
|
|
||||||
|
|
||||||
export default function TabBar() {
|
|
||||||
return (
|
|
||||||
<View style={styles.wrapper}>
|
|
||||||
<Text>First Tab</Text>
|
|
||||||
</View>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
const styles = StyleSheet.create({
|
|
||||||
wrapper: {
|
|
||||||
backgroundColor: '#131322',
|
|
||||||
paddingVertical: 24,
|
|
||||||
paddingHorizontal: 12,
|
|
||||||
flexDirection: 'row',
|
|
||||||
justifyContent: 'space-between',
|
|
||||||
},
|
|
||||||
});
|
|
21
apps/mobile/components/TabBarIcon.tsx
Normal file
21
apps/mobile/components/TabBarIcon.tsx
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
import { FontAwesome } from '@expo/vector-icons';
|
||||||
|
import Colors from '../constants/Colors';
|
||||||
|
|
||||||
|
type Props = {
|
||||||
|
focused?: boolean;
|
||||||
|
color?: string;
|
||||||
|
} & React.ComponentProps<typeof FontAwesome>;
|
||||||
|
|
||||||
|
export default function TabBarIcon({
|
||||||
|
color = Colors.dark.shade300,
|
||||||
|
focused,
|
||||||
|
...rest
|
||||||
|
}: Props) {
|
||||||
|
return (
|
||||||
|
<FontAwesome
|
||||||
|
color={color || (focused ? Colors.dark.purple300 : Colors.dark.shade300)}
|
||||||
|
size={24}
|
||||||
|
{...rest}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
@@ -2,6 +2,7 @@ import { globalStyles } from '../../styles/global';
|
|||||||
import { Image, Text, View } from 'react-native';
|
import { Image, Text, View } from 'react-native';
|
||||||
import styles from './styles';
|
import styles from './styles';
|
||||||
import { BoldText, RegularText } from '../Styled';
|
import { BoldText, RegularText } from '../Styled';
|
||||||
|
import { TMDB_POSTER_PATH } from '../../constants/General';
|
||||||
|
|
||||||
export default function Item() {
|
export default function Item() {
|
||||||
return (
|
return (
|
||||||
@@ -9,7 +10,7 @@ export default function Item() {
|
|||||||
<View style={styles.imageWrapper}>
|
<View style={styles.imageWrapper}>
|
||||||
<Image
|
<Image
|
||||||
source={{
|
source={{
|
||||||
uri: 'https://image.tmdb.org/t/p/w342//gdIrmf2DdY5mgN6ycVP0XlzKzbE.jpg',
|
uri: `${TMDB_POSTER_PATH}/w342//gdIrmf2DdY5mgN6ycVP0XlzKzbE.jpg`,
|
||||||
width: 200,
|
width: 200,
|
||||||
}}
|
}}
|
||||||
style={styles.image}
|
style={styles.image}
|
||||||
|
1
apps/mobile/constants/General.ts
Normal file
1
apps/mobile/constants/General.ts
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export const TMDB_POSTER_PATH = `https://image.tmdb.org/t/p`;
|
13918
apps/mobile/package-lock.json
generated
13918
apps/mobile/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user