--- import Layout from "../../layouts/Layout.astro"; import Menu from "../../components/Menu.astro"; export async function getStaticPaths() { const response = await fetch('https://management.beanstalkedu.com/items/themes'); const data = await response.json(); const finalData = data.data.map((n: { theme_slug: string | undefined; })=>{ return {params: {id:n.theme_slug}} }) return finalData; } const { id } = Astro.params; const response = await fetch('https://curriculum-app-api.beanstalkedu.com/items/themes?filter[theme_slug][_eq]='+id); const data = await response.json(); const themes = data.data; const thisThemesID = data.data[0].id; const tciResp = await fetch('https://curriculum-app-api.beanstalkedu.com/items/theme_celebration_ideas?filter[theme_key][_in]=' + thisThemesID ); const tciRespJson = await tciResp.json(); const tciRespData = tciRespJson.data.reverse().slice(0, 4); const twsResp = await fetch('https://curriculum-app-api.beanstalkedu.com/items/theme_workshets?filter[theme_key][_in]=' + thisThemesID); const twsRespJson = await twsResp.json(); const twsRespData = twsRespJson.data.reverse().slice(0, 3); const twsRespData2 = twsRespJson.data[3]; import ThemesVideos from "../../components/ThemesVideos.vue"; import ThemesAudioBook from "../../components/ThemesAudioBook.vue"; const tcsResp = await fetch('https://curriculum-app-api.beanstalkedu.com/items/theme_celebration_stories?filter[theme_key][_in]=' + thisThemesID); const tcsRespJson = await tcsResp.json(); const tcsRespData = tcsRespJson.data.reverse().slice(0, 4); import SubmitCelebration from "../../components/SubmitCelebration.vue"; const ytvResp = await fetch('https://curriculum-app-api.beanstalkedu.com/items/theme_youtube_videos?filter[theme_key][_in]=' + thisThemesID); const ytvRespJson = await ytvResp.json(); const ytvRespData = ytvRespJson.data.reverse(); const allthemesResp = await fetch('https://curriculum-app-api.beanstalkedu.com/items/themes?limit=3&filter[id][_neq]=' + thisThemesID); const allthemesRespJson = await allthemesResp.json(); const allthemesRespData = allthemesRespJson.data; const faqresponse = await fetch('https://management.beanstalkedu.com/items/FAQ?filter[property][_eq]=teenybeans_curriculum&filter[slug][_eq]=themes'); const faqdata = await faqresponse.json(); const faq = faqdata.data; import Footer from "../../components/Footer.vue"; ---

Theme of the Month- {themes[0].theme_title}

{themes[0].theme_text }
{themes[0].theme_details }
Celebration Ideas
{themes[0].celebration_ideas_text}
{tciRespData.map((data: { celebration_ideas_img: string | undefined; celebration_ideas_title: string | undefined; celebration_ideas_body_text: string | undefined; title: string | undefined; }) =>
{data.celebration_ideas_title}
{data.celebration_ideas_body_text}
)}
Worksheets
{themes[0].worksheets_text}
{twsRespData.map((data: { title: string | undefined; theme_worksheets_img: string | undefined; file: string | undefined; }) => )}

+ Subscribe

 To download
more resources

YouTube Videos for your reference
{themes[0].youtube_text}
{ytvRespData.map((data: { youtube_id: string | undefined; youtube_thumbnail: string | undefined; about_the_video: string | undefined; }) => )}

Other Themes

{allthemesRespData.map((data: { theme_slug: string | undefined; theme_icon: string | undefined; }) => )}
{faq.length >0 &&

Frequently Asked Questions

{faq.map((data: { title: string | undefined; }) =>
{data.title}
)}
}