forked from magonysandormate/PeePal
Tesztelés hijján kész
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { useState } from 'react';
|
||||
import { useAuth } from './AuthContext'; // Update this path
|
||||
import { Link } from "react-router-dom";
|
||||
import { useAuth } from './AuthContext';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
|
||||
export default function Bejelentkezes() {
|
||||
@@ -61,6 +62,13 @@ export default function Bejelentkezes() {
|
||||
>
|
||||
{loading ? 'Betöltés...' : 'Bejelentkezés'}
|
||||
</button>
|
||||
|
||||
<Link
|
||||
to="/regisztracio"
|
||||
className="block text-center text-sm text-blue-600 hover:underline mt-2"
|
||||
>
|
||||
Nincs még fiókod? Regisztrálj itt!
|
||||
</Link>
|
||||
</form>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -1,13 +1,27 @@
|
||||
import { Plus } from "lucide-react";
|
||||
import { Link } from "react-router-dom";
|
||||
import { useAuth } from "../Bejel_Regisz/AuthContext";
|
||||
|
||||
export default function HozzaadGomb() {
|
||||
return (
|
||||
<Link
|
||||
to="/hozzaadas"
|
||||
className="fixed bottom-6 right-6 w-16 h-16 bg-blue-500 text-white rounded-full flex items-center justify-center shadow-lg hover:bg-blue-600 transition"
|
||||
>
|
||||
<Plus size={24} />
|
||||
</Link>
|
||||
);
|
||||
const { user } = useAuth();
|
||||
|
||||
if (user) {
|
||||
return (
|
||||
<Link
|
||||
to="/hozzaadas"
|
||||
className="fixed bottom-6 right-6 w-16 h-16 bg-blue-500 text-white rounded-full flex items-center justify-center shadow-lg hover:bg-blue-600 transition"
|
||||
>
|
||||
<Plus size={24} />
|
||||
</Link>
|
||||
);
|
||||
} else {
|
||||
return (
|
||||
<Link
|
||||
to="/bejelentkezes"
|
||||
className="fixed bottom-6 right-6 w-16 h-16 bg-blue-500 text-white rounded-full flex items-center justify-center shadow-lg hover:bg-blue-600 transition"
|
||||
>
|
||||
<Plus size={24} />
|
||||
</Link>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user