All files / widgets/ErrorPopUp/mobile/Components RealityCheck.tsx

100% Statements 1/1
100% Branches 0/0
100% Functions 1/1
100% Lines 1/1

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44                    10x                                                                  
import { Text, View } from 'react-native';
import { NativeErrorContent } from '../../ErrorPopUp.types';
import { Button } from '@sb/ui/components/atoms/Button/mobile';
import { parseFormattedNativeContent } from '@sb/libs/utils.native';
import { footerButtonClasses, footerButtonTextStyle, paragraphClasses } from './utils';
 
export function NativeRealityCheck(
  onLogoutClick: () => void,
  onStayLoggedInClick: () => void
): NativeErrorContent {
  return {
    showCloseIcon: false,
    title: 'Aktivitätsbenachrichtigung',
    description: (
      <View>
        <Text className={paragraphClasses}>
          {parseFormattedNativeContent(
            'Du bist seit: <semibold>XX:XX Minuten</semibold> aktiv. Bitte spiele verantwortungsvoll und gönne dir regelmäßig eine Pause.',
            'font-semibold',
            'semibold'
          )}
        </Text>
        <View className="mt-2 flex flex-col gap-3">
          <Button
            variant="secondary"
            label="Eingeloggt bleiben"
            onPress={onStayLoggedInClick}
            className={footerButtonClasses}
            textStyle={footerButtonTextStyle}
          />
          <Button
            label="Abmelden"
            variant="ghostDark"
            onPress={onLogoutClick}
            className={footerButtonClasses}
            textStyle={footerButtonTextStyle}
          />
        </View>
      </View>
    ),
    footerButtonLabel: '',
  };
}