Created
March 27, 2024 13:48
-
-
Save pranitkhadilkar7/74c7585cc884599440609d764db33420 to your computer and use it in GitHub Desktop.
src/pages/home/home-service.ts file for RTK Query endpoints specific to home page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { applicationApi } from '../../store/service' | |
import { LatestRelease } from './home-type' | |
const homeService = applicationApi.injectEndpoints({ | |
endpoints: (build) => ({ | |
getLatestRelease: build.query<LatestRelease, void>({ | |
query: () => ({ | |
url: '/release/latest', | |
method: 'GET', | |
}), | |
}), | |
}), | |
}) | |
export const { useGetLatestReleaseQuery } = homeService |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment