forked from magonysandormate/PeePal
Tesztelés hijján kész
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
import { useState } from 'react';
|
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';
|
import { useNavigate } from 'react-router-dom';
|
||||||
|
|
||||||
export default function Bejelentkezes() {
|
export default function Bejelentkezes() {
|
||||||
@@ -61,6 +62,13 @@ export default function Bejelentkezes() {
|
|||||||
>
|
>
|
||||||
{loading ? 'Betöltés...' : 'Bejelentkezés'}
|
{loading ? 'Betöltés...' : 'Bejelentkezés'}
|
||||||
</button>
|
</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>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,13 +1,27 @@
|
|||||||
import { Plus } from "lucide-react";
|
import { Plus } from "lucide-react";
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
|
import { useAuth } from "../Bejel_Regisz/AuthContext";
|
||||||
|
|
||||||
export default function HozzaadGomb() {
|
export default function HozzaadGomb() {
|
||||||
return (
|
const { user } = useAuth();
|
||||||
<Link
|
|
||||||
to="/hozzaadas"
|
if (user) {
|
||||||
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"
|
return (
|
||||||
>
|
<Link
|
||||||
<Plus size={24} />
|
to="/hozzaadas"
|
||||||
</Link>
|
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