import React from 'react'; import { Link } from 'react-router-dom'; import { useAtom } from 'jotai'; import { authAtom, updateAuthAtom } from '../atoms/authAtom'; import { pb } from '../lib/pocketbase'; const Header: React.FC = () => { const [isAuth] = useAtom(authAtom); const [, updateAuth] = useAtom(updateAuthAtom); const handleLogout = () => { pb.authStore.clear(); updateAuth(); }; return (
Reddit-Like-App Kod źródłowy
); }; export default Header; // komponent odpowiedzialny za nagłówek strony