mirror of
https://github.com/WDI-Ideas/rubix.git
synced 2026-04-27 22:55:50 +00:00
13 lines
427 B
JavaScript
13 lines
427 B
JavaScript
import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query/react'
|
|
const API_URL = import.meta.env.VITE_API_BASE_URL;
|
|
export const ecoSystem = createApi({
|
|
reducerPath: 'ecoSystem',
|
|
baseQuery: fetchBaseQuery({ baseUrl: API_URL }),
|
|
endpoints: (builder) => ({
|
|
getEcoSystem: builder.query({
|
|
query: () => 'eco/active',
|
|
}),
|
|
}),
|
|
});
|
|
|
|
export const { useGetEcoSystemQuery } = ecoSystem; |