// redux/thunks/getAuthThunks.ts import { createAsyncThunk } from "@reduxjs/toolkit"; import { fetchAuthService } from "@/services/fetchAuthService"; import { setAdminLoggedIn } from "@/redux/slices/authSlice"; export const getAuthThunks = createAsyncThunk( "auth/getAuthThunks", async (_, { dispatch }) => { const { isAdminLoggedIn } = fetchAuthService(); dispatch(setAdminLoggedIn(isAdminLoggedIn)); // boolean, nicht string! } );