Files
SSA-Admin-Panel/src/Redux/Service/myprofie.service.ts
2025-02-10 19:54:18 +05:30

26 lines
512 B
TypeScript

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