This commit is contained in:
1 parent
3b2c3605fd
commit
c4b1b54f61
6 files changed
+255
-40
No files matched your search
@@ -0,0 +1,17 @@
|
||||
function ClubsPage() {
|
||||
return (
|
||||
<div style={{ padding: '2rem' }}>
|
||||
<div style={{ maxWidth: '1200px', margin: '0 auto' }}>
|
||||
<h1>Vereinsverwaltung</h1>
|
||||
|
||||
<div className="card" style={{ marginTop: '1.5rem' }}>
|
||||
<p style={{ color: 'var(--text2)' }}>
|
||||
Vereinsverwaltung folgt in Kürze
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default ClubsPage
|
||||
@@ -1,5 +1,4 @@
|
||||
import React, { useState, useEffect } from 'react'
|
||||
import { useNavigate } from 'react-router-dom'
|
||||
import { useAuth } from '../context/AuthContext'
|
||||
import api from '../utils/api'
|
||||
|
||||
@@ -7,8 +6,7 @@ function Dashboard() {
|
||||
const [version, setVersion] = useState(null)
|
||||
const [profile, setProfile] = useState(null)
|
||||
const [loading, setLoading] = useState(true)
|
||||
const { logout } = useAuth()
|
||||
const navigate = useNavigate()
|
||||
const { user } = useAuth()
|
||||
|
||||
useEffect(() => {
|
||||
loadData()
|
||||
@@ -29,18 +27,6 @@ function Dashboard() {
|
||||
}
|
||||
}
|
||||
|
||||
const handleLogout = async () => {
|
||||
try {
|
||||
await api.logout()
|
||||
} catch (err) {
|
||||
console.error('Logout error:', err)
|
||||
} finally {
|
||||
localStorage.removeItem('authToken')
|
||||
logout()
|
||||
navigate('/login')
|
||||
}
|
||||
}
|
||||
|
||||
if (loading) {
|
||||
return (
|
||||
<div style={{ padding: '2rem', textAlign: 'center' }}>
|
||||
@@ -51,32 +37,15 @@ function Dashboard() {
|
||||
}
|
||||
|
||||
return (
|
||||
<div style={{ minHeight: '100vh', background: 'var(--bg)', padding: '1rem' }}>
|
||||
{/* Header */}
|
||||
<div style={{
|
||||
maxWidth: '1200px',
|
||||
margin: '0 auto',
|
||||
display: 'flex',
|
||||
justifyContent: 'space-between',
|
||||
alignItems: 'center',
|
||||
marginBottom: '2rem'
|
||||
}}>
|
||||
<div>
|
||||
<h1 style={{ margin: 0 }}>🥋 Shinkan Jinkendo</h1>
|
||||
<p style={{ color: 'var(--text2)', margin: '0.25rem 0 0 0' }}>
|
||||
Willkommen, {profile?.name || profile?.email}
|
||||
</p>
|
||||
</div>
|
||||
<button className="btn btn-secondary" onClick={handleLogout}>
|
||||
Abmelden
|
||||
</button>
|
||||
</div>
|
||||
|
||||
{/* Main Content */}
|
||||
<div style={{ minHeight: '100vh', background: 'var(--bg)', padding: '2rem' }}>
|
||||
<div style={{ maxWidth: '1200px', margin: '0 auto' }}>
|
||||
<h1>Dashboard</h1>
|
||||
<p style={{ color: 'var(--text2)', marginTop: '0.5rem' }}>
|
||||
Willkommen, {user?.name || user?.email}!
|
||||
</p>
|
||||
{/* Welcome Card */}
|
||||
<div className="card" style={{ marginBottom: '1.5rem' }}>
|
||||
<h2>Dashboard</h2>
|
||||
<div className="card" style={{ marginTop: '1.5rem', marginBottom: '1.5rem' }}>
|
||||
<h2>Willkommen bei Shinkan Jinkendo</h2>
|
||||
<p style={{ color: 'var(--text2)' }}>
|
||||
Trainer- und Vereinsplattform für Kampfsport-Trainingsplanung
|
||||
</p>
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
function ExercisesPage() {
|
||||
return (
|
||||
<div style={{ padding: '2rem' }}>
|
||||
<div style={{ maxWidth: '1200px', margin: '0 auto' }}>
|
||||
<h1>Übungsverwaltung</h1>
|
||||
|
||||
<div className="card" style={{ marginTop: '1.5rem' }}>
|
||||
<p style={{ color: 'var(--text2)' }}>
|
||||
Übungsverwaltung wird als nächstes implementiert
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default ExercisesPage
|
||||
@@ -0,0 +1,60 @@
|
||||
import { useAuth } from '../context/AuthContext'
|
||||
|
||||
function ProfilePage() {
|
||||
const { user } = useAuth()
|
||||
|
||||
return (
|
||||
<div style={{ padding: '2rem' }}>
|
||||
<div style={{ maxWidth: '800px', margin: '0 auto' }}>
|
||||
<h1>Profil</h1>
|
||||
|
||||
<div className="card" style={{ marginTop: '1.5rem' }}>
|
||||
<h2>Persönliche Daten</h2>
|
||||
|
||||
<div style={{ marginTop: '1rem' }}>
|
||||
<div style={{ display: 'grid', gridTemplateColumns: '150px 1fr', gap: '1rem', marginBottom: '1rem' }}>
|
||||
<strong>Name:</strong>
|
||||
<span>{user?.name || '-'}</span>
|
||||
|
||||
<strong>E-Mail:</strong>
|
||||
<span>{user?.email}</span>
|
||||
|
||||
<strong>Rolle:</strong>
|
||||
<span style={{
|
||||
padding: '0.25rem 0.5rem',
|
||||
background: user?.role === 'admin' ? 'var(--accent)' : 'var(--surface2)',
|
||||
color: user?.role === 'admin' ? 'white' : 'var(--text1)',
|
||||
borderRadius: '4px',
|
||||
display: 'inline-block',
|
||||
fontSize: '0.875rem'
|
||||
}}>
|
||||
{user?.role || 'user'}
|
||||
</span>
|
||||
|
||||
<strong>Tier:</strong>
|
||||
<span style={{
|
||||
padding: '0.25rem 0.5rem',
|
||||
background: user?.tier === 'premium' ? 'var(--accent)' : 'var(--surface2)',
|
||||
color: user?.tier === 'premium' ? 'white' : 'var(--text1)',
|
||||
borderRadius: '4px',
|
||||
display: 'inline-block',
|
||||
fontSize: '0.875rem'
|
||||
}}>
|
||||
{user?.tier || 'free'}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="card" style={{ marginTop: '1.5rem' }}>
|
||||
<h2>Einstellungen</h2>
|
||||
<p style={{ color: 'var(--text2)', marginTop: '0.5rem' }}>
|
||||
Bearbeitung folgt in Kürze
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default ProfilePage
|
||||
Reference in new issue
Block a user