You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
1.6 KiB
49 lines
1.6 KiB
import { Ionicons } from '@expo/vector-icons';
|
|
import { StyleSheet, Text, View } from 'react-native';
|
|
import { colors, spacing } from '../../../src/theme';
|
|
import { useOnboarding } from '../../../src/hooks';
|
|
import { ScreenShell } from '../ui/ScreenShell';
|
|
import { YearMonthWheel } from '../ui/WheelPicker';
|
|
import { PrimaryButton } from '../ui/PrimaryButton';
|
|
|
|
export function P10FirstWork() {
|
|
const { data, setData, navigate, back } = useOnboarding();
|
|
|
|
// 未滑动滚轮时 state 仍是空串,此时放行会把空年份写进资料
|
|
const canNext = data.firstWorkYear !== '' && data.firstWorkMonth !== '';
|
|
|
|
return (
|
|
<ScreenShell title="首次参加工作" showBack onBack={back}>
|
|
<View style={styles.iconWrap}>
|
|
<Ionicons name="calendar" size={34} color={colors.primary} />
|
|
</View>
|
|
<Text style={styles.tip}>1 年以内经验</Text>
|
|
|
|
<YearMonthWheel
|
|
year={data.firstWorkYear}
|
|
month={data.firstWorkMonth}
|
|
onYearChange={(v) => setData({ firstWorkYear: v })}
|
|
onMonthChange={(v) => setData({ firstWorkMonth: v })}
|
|
/>
|
|
|
|
<View style={styles.footer}>
|
|
<PrimaryButton label="下一步" active={canNext} onPress={() => navigate('P11')} />
|
|
</View>
|
|
</ScreenShell>
|
|
);
|
|
}
|
|
|
|
const styles = StyleSheet.create({
|
|
iconWrap: {
|
|
width: 64,
|
|
height: 64,
|
|
borderRadius: 18,
|
|
backgroundColor: colors.primaryLight,
|
|
alignItems: 'center',
|
|
justifyContent: 'center',
|
|
alignSelf: 'center',
|
|
marginBottom: spacing.block,
|
|
},
|
|
tip: { fontSize: 13, color: colors.textHint, textAlign: 'center', marginBottom: spacing.block },
|
|
footer: { marginTop: 28 },
|
|
});
|
|
|