"use client";
import { getUserSessionId } from "@/utils/helper";
import { TechniqueProps } from "./techniqueTypes";


export async function getVibeData(): Promise<TechniqueProps[]> {
  const response = await fetch(`${process.env.NEXT_PUBLIC_APP_URL}/vibe?session_id=${getUserSessionId()}`, {
    cache: "no-store", //// optional: if you're using Next.js
  });

  if (!response.ok) {
    throw new Error("Failed to fetch vibe data");
  }

  const data = await response.json();
  return data.data;
}