25 lines
770 B
TypeScript
25 lines
770 B
TypeScript
import React from 'react';
|
|
import { View, Text, Button, StyleSheet } from 'react-native';
|
|
import { signOut } from 'firebase/auth';
|
|
import { auth } from '../config/firebase';
|
|
|
|
export default function AdminScreen({ navigation }: any) {
|
|
const handleLogout = async () => {
|
|
await signOut(auth);
|
|
navigation.replace('Login');
|
|
};
|
|
|
|
return (
|
|
<View style={styles.container}>
|
|
<Text style={styles.title}>Admin Panel</Text>
|
|
<Text>Csak adminok láthatják ezt a képernyőt</Text>
|
|
<Button title="Kijelentkezés" onPress={handleLogout} />
|
|
</View>
|
|
);
|
|
}
|
|
|
|
const styles = StyleSheet.create({
|
|
container: { flex: 1, padding: 16, justifyContent: 'center', alignItems: 'center' },
|
|
title: { fontSize: 24, fontWeight: 'bold', marginBottom: 16 },
|
|
});
|