|
|
@@ -4,6 +4,7 @@ import { SafeAreaView } from 'react-native-safe-area-context';
|
|
|
import { router } from 'expo-router';
|
|
|
import { CrossLogoSvg, RightArrowIconSvg } from '../global/SVG';
|
|
|
import NormalButton from '../global/normal_button';
|
|
|
+import { useTranslation } from '../../util/hooks/useTranslation';
|
|
|
|
|
|
type TermsSectionProps = {
|
|
|
title: string| undefined;
|
|
|
@@ -23,6 +24,8 @@ const TermsSection: React.FC<TermsSectionProps> = ({ title, clauses }) => (
|
|
|
</View>
|
|
|
);
|
|
|
const UserTermsPageComponent: React.FC = () => {
|
|
|
+ const { getCurrentLanguageConfig } = useTranslation()
|
|
|
+ const curren = getCurrentLanguageConfig()
|
|
|
const sectionsZh = [
|
|
|
{
|
|
|
clauses: [
|
|
|
@@ -193,26 +196,34 @@ const UserTermsPageComponent: React.FC = () => {
|
|
|
<SafeAreaView className="flex-1 bg-white" edges={['top', 'right', 'left']}>
|
|
|
<View style={styles.container}>
|
|
|
<ScrollView contentContainerStyle={styles.scrollContainer}>
|
|
|
- <Text style={styles.header}>Crazy Charge 用戶條款及細則</Text>
|
|
|
- <View style={styles.section}>
|
|
|
- {sectionsZh.map((section, index) => (
|
|
|
- <TermsSection
|
|
|
- key={index}
|
|
|
- title={section.title}
|
|
|
- clauses={section.clauses}
|
|
|
- />
|
|
|
- ))}
|
|
|
- </View>
|
|
|
- <Text style={styles.header}>Crazy Charge Users’ Terms and Conditions</Text>
|
|
|
- <View style={styles.section}>
|
|
|
- {sectionsEn.map((section, index) => (
|
|
|
- <TermsSection
|
|
|
- key={index}
|
|
|
- title={section.title}
|
|
|
- clauses={section.clauses}
|
|
|
- />
|
|
|
- ))}
|
|
|
- </View>
|
|
|
+ {curren?.value?
|
|
|
+ <View>
|
|
|
+ <Text style={styles.header}>Crazy Charge 用戶條款及細則</Text>
|
|
|
+ <View style={styles.section}>
|
|
|
+ {sectionsZh.map((section, index) => (
|
|
|
+ <TermsSection
|
|
|
+ key={index}
|
|
|
+ title={section.title}
|
|
|
+ clauses={section.clauses}
|
|
|
+ />
|
|
|
+ ))}
|
|
|
+ </View>
|
|
|
+ </View>
|
|
|
+ :
|
|
|
+ <View>
|
|
|
+ <Text style={styles.header}>Crazy Charge Users’ Terms and Conditions</Text>
|
|
|
+ <View style={styles.section}>
|
|
|
+ {sectionsEn.map((section, index) => (
|
|
|
+ <TermsSection
|
|
|
+ key={index}
|
|
|
+ title={section.title}
|
|
|
+ clauses={section.clauses}
|
|
|
+ />
|
|
|
+ ))}
|
|
|
+ </View>
|
|
|
+ </View>
|
|
|
+ }
|
|
|
+
|
|
|
</ScrollView>
|
|
|
<NormalButton
|
|
|
extendedStyle={styles.agreeButton}
|