import { createApi } from "@reduxjs/toolkit/query"; import { baseQueryWithReauth } from "./apiSlice"; export const manageSubAdmin = createApi({ reducerPath: "manageSubAdmin", baseQuery: baseQueryWithReauth, // Use enhanced baseQuery with error handling endpoints: (builder) => ({ getPosts: builder.query({ query: () => "/posts" }), }), }); export const { } = manageSubAdmin; export type Post = { id: number; title: string; body: string; };