added possible-user-tasks

This commit is contained in:
z1glr
2025-01-28 22:23:12 +00:00
parent f7fbc4dfc2
commit 2c005e61a6
13 changed files with 338 additions and 232 deletions

View File

@@ -1,7 +1,7 @@
"use client";
import { apiCall } from "@/lib";
import zustand from "@/Zustand";
import zustand, { StateUser } from "@/Zustand";
import { Spinner } from "@heroui/react";
import { usePathname, useRouter } from "next/navigation";
import React, { useEffect, useState } from "react";
@@ -23,10 +23,7 @@ export default function Main({ children }: { children: React.ReactNode }) {
void (async () => {
let loggedIn = false;
const welcomeResult = await apiCall<{
userName: string;
loggedIn: boolean;
}>("GET", "welcome");
const welcomeResult = await apiCall<StateUser>("GET", "welcome");
if (welcomeResult.ok) {
try {