|
@@ -6,6 +6,8 @@ import { useI18n } from "locales/client";
|
|
|
import { useWorkoutSessionService } from "@/shared/lib/workout-session/use-workout-session.service";
|
|
|
import { WorkoutSessionList } from "@/features/workout-session/ui/workout-session-list";
|
|
|
import { WorkoutSessionHeatmap } from "@/features/workout-session/ui/workout-session-heatmap";
|
|
|
+import { useSession } from "@/features/auth/lib/auth-client";
|
|
|
+import { LocalAlert } from "@/components/ui/local-alert";
|
|
|
import { Button } from "@/components/ui/button";
|
|
|
|
|
|
import type { WorkoutSession } from "@/shared/lib/workout-session/types/workout-session";
|
|
@@ -15,7 +17,7 @@ export default function ProfilePage() {
|
|
|
const t = useI18n();
|
|
|
const [sessions, setSessions] = useState<WorkoutSession[]>([]);
|
|
|
const { getAll } = useWorkoutSessionService();
|
|
|
-
|
|
|
+ const { data: session } = useSession();
|
|
|
useEffect(() => {
|
|
|
const loadSessions = async () => {
|
|
|
const loadedSessions = await getAll();
|
|
@@ -36,6 +38,7 @@ export default function ProfilePage() {
|
|
|
|
|
|
return (
|
|
|
<div>
|
|
|
+ {!session && <LocalAlert />}
|
|
|
<WorkoutSessionHeatmap until={until} values={values} />
|
|
|
<WorkoutSessionList />
|
|
|
<div className="mt-8 flex justify-center">
|