- import {Guitar} from "../type/guitars";
-
- export const fetchGuitars = async (): Promise<Guitar[]> => {
- const response = await fetch(`${process.env.NEXT_PUBLIC_STRAPI_URL}/api/guitars?populate=*`)
- const guitars:Guitar[] =await response.json().then((json) => json.data)
- return guitars
- }
|