Profil: /profile/gyms - dodany przycisk Wstecz w naglowku (md+; na telefonie jest w topbarze)
This commit is contained in:
@@ -1,15 +1,17 @@
|
||||
import { useState } from 'react';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { Plus } from 'lucide-react';
|
||||
import { useMe } from '../../api/queries';
|
||||
import GymsSection from '../../components/gyms/GymsSection';
|
||||
import { BackButton, PageHeader } from '../../components/ui';
|
||||
import { useTopbar } from '../../topbar';
|
||||
|
||||
export default function ProfileGyms() {
|
||||
const navigate = useNavigate();
|
||||
const { data: me } = useMe();
|
||||
const isAdmin = me?.user.isAdmin ?? false;
|
||||
const [createOpen, setCreateOpen] = useState(false);
|
||||
|
||||
// „Wstecz” jest w topbarze („<” na mobile, przycisk na md+) — bez osobnego w treści
|
||||
useTopbar({
|
||||
title: 'Profil — siłownie',
|
||||
back: '/profile',
|
||||
@@ -18,5 +20,10 @@ export default function ProfileGyms() {
|
||||
: undefined,
|
||||
});
|
||||
|
||||
return <GymsSection createOpen={createOpen} onCreateOpenChange={setCreateOpen} />;
|
||||
return (
|
||||
<>
|
||||
<PageHeader title="Siłownie" actions={<BackButton onClick={() => navigate('/profile')} />} />
|
||||
<GymsSection createOpen={createOpen} onCreateOpenChange={setCreateOpen} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user