You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- 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
- }
|