Initial commit: React frontend (SLP Software) + AIDLC workflow docs
Co-authored-by: Junie <junie@jetbrains.com>
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import { packages, type PackageCardData } from '../data/content';
|
||||
|
||||
/**
|
||||
* Placeholder query hook (requirements FR-5). The queryFn currently just resolves the
|
||||
* static package data, wrapped in a Promise so the calling component already consumes
|
||||
* it exactly the way it will once a real API exists — only this queryFn's body will
|
||||
* need to change in a future iteration.
|
||||
*/
|
||||
async function fetchPackages(): Promise<PackageCardData[]> {
|
||||
return Promise.resolve(packages);
|
||||
}
|
||||
|
||||
export function usePackagesQuery() {
|
||||
return useQuery({
|
||||
queryKey: ['packages'],
|
||||
queryFn: fetchPackages,
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user