mirror of
https://github.com/Dvorinka/MyClubServer.git
synced 2026-06-04 10:42:57 +00:00
enhance
This commit is contained in:
+1
-1
@@ -11,7 +11,7 @@ import { isFanLogged, isAdminLogged } from './services/auth';
|
||||
|
||||
const AppContent = () => {
|
||||
const { pinnedClub, isClubReady } = useClub();
|
||||
const { themeReady, theme } = useClubTheme(pinnedClub);
|
||||
const { themeReady, theme } = useClubTheme(pinnedClub ?? undefined);
|
||||
|
||||
useEffect(() => {
|
||||
// Initialize push notifications when club is ready
|
||||
|
||||
@@ -175,7 +175,7 @@ export const ModernInput: React.FC<ModernInputProps> = ({
|
||||
{label && <Text style={{ fontSize: 14, fontWeight: '600', marginBottom: 8, color: '#374151' }}>{label}</Text>}
|
||||
<View style={[
|
||||
{ flexDirection: 'row', alignItems: 'center', borderWidth: 1, borderRadius: 12, paddingHorizontal: 16, paddingVertical: 12, backgroundColor: '#FFFFFF' },
|
||||
error && { borderWidth: 2, borderColor: '#EF4444' },
|
||||
Boolean(error) && { borderWidth: 2, borderColor: '#EF4444' },
|
||||
!error && { borderColor: theme.primary + '30' }
|
||||
]}>
|
||||
{icon && <Text style={{ marginRight: 12, fontSize: 16 }}>{icon}</Text>}
|
||||
|
||||
@@ -36,14 +36,14 @@ const TicketScreen: React.FC = () => {
|
||||
|
||||
return (
|
||||
<ScrollView contentContainerStyle={styles.container}>
|
||||
<Text style={styles.title}>{ticket.campaignTitle}</Text>
|
||||
<Text style={styles.title}>{ticket.event}</Text>
|
||||
<Text style={styles.sub}>QR průkaz pro vstup</Text>
|
||||
<View style={styles.qrBox}>
|
||||
<QRCode value={JSON.stringify(ticket)} size={240} backgroundColor="#fff" color="#000" />
|
||||
</View>
|
||||
<Text style={styles.code}>Kód: {ticket.barcode}</Text>
|
||||
<Text style={styles.info}>Držitel: {ticket.holderName}</Text>
|
||||
{ticket.matchDateTime && <Text style={styles.info}>Datum: {ticket.matchDateTime}</Text>}
|
||||
<Text style={styles.info}>Držitel: {ticket.holder}</Text>
|
||||
{ticket.date && <Text style={styles.info}>Datum: {ticket.date}</Text>}
|
||||
{ticket.venue && <Text style={styles.info}>Místo: {ticket.venue}</Text>}
|
||||
<TouchableOpacity style={styles.button} onPress={() => { /* TODO: add Wallet pass later */ }}>
|
||||
<Text style={styles.buttonText}>Uložit / sdílet</Text>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import AsyncStorage from '@react-native-async-storage/async-storage';
|
||||
import axios, { AxiosInstance, AxiosRequestConfig, AxiosResponse } from 'axios';
|
||||
import axios, { AxiosInstance, AxiosResponse, InternalAxiosRequestConfig } from 'axios';
|
||||
import Constants from 'expo-constants';
|
||||
import * as Linking from 'expo-linking';
|
||||
|
||||
@@ -50,7 +50,7 @@ export async function getApi(): Promise<AxiosInstance> {
|
||||
timeout: 15000,
|
||||
});
|
||||
|
||||
apiInstance.interceptors.request.use((config: AxiosRequestConfig) => config);
|
||||
apiInstance.interceptors.request.use((config: InternalAxiosRequestConfig) => config);
|
||||
apiInstance.interceptors.response.use(
|
||||
(resp: AxiosResponse) => resp,
|
||||
(err) => Promise.reject(err)
|
||||
|
||||
Reference in New Issue
Block a user