Can't fetch data from Strapi

  • Strapi Version: v4.9.0:
  • Operating System: Chromeos:
  • Node version: v21.2.0:
  • NPM version: 10.2.3:

Hi, I am developing a website with my team. The framework which I am using is Astro with Strapi as headless CMS. I am in a trouble to fetch a field in my CMS.

The component script is given below.

import CMS from “@store/CMS”;
import RecurringImages from “@store/RecurringImages”;

declare interface Notification {
locale: string;
Title: string;
Type: “Error” | “Warning” | “Info” | “Success” | “Default”;
Closing_Enabled: boolean;
NotificationSm: boolean;
Bordered: boolean;
Rounded: boolean;
}

const { locale, Title, Type, Closing_Enabled, NotificationSm, Bordered, Rounded } =
Astro.props as Notification;

if (Type !== “Default”) {
var icon = RecurringImages[${Type.toLowerCase()}_notification];
}

const ariaLabelRecurData = CMS.get(“ariaLabelRecurringElement”, locale);

When I do console log after passing props to the page, the ariaLabelRecurData has no answer for it. Please help me to solve. The query name which I need to fetch is “ariaLabelRecurringElement”.