SYNC-HP用のサンプル
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.

7 lines
295B

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