import 'server-only';
import { ImageType } from '@akinon/next/types';
import { getWidgetData } from '@akinon/next/data/server';
import { Link } from '@theme/components';
import { Image } from '@akinon/next/components/image';
function TitleSection({
mobileTitle,
mobileSubtitle
}: {
mobileTitle?: { value: string };
mobileSubtitle?: { value: string };
}) {
return (
<>
{mobileTitle ? (
{mobileTitle.value}
) : null}
{mobileSubtitle ? (
{mobileSubtitle.value}
) : null}
>
);
}
function MobileLinks({ mobileLinks }: { mobileLinks?: MobileLink[] }) {
return (
{mobileLinks?.map((item, index) => (
-
{item?.value?.text}
))}
);
}
type StoryData = {
value: {
url: string;
alt: string;
image: string;
};
kwargs: {
data_type: 'nested';
value: {
image: ImageType;
};
};
};
type MobileLink = {
value: {
url: string;
text: string;
};
};
type HomeStoriesEngType = {
mobileTitle?: {
value: string;
};
mobileSubtitle?: {
value: string;
};
stories: StoryData[];
mobileLinks: MobileLink[];
};
export default async function HomeStoriesEng() {
const data = await getWidgetData({
slug: 'home-storieseng'
});
return (
{data?.attributes?.stories?.map((story, index) => {
return (
{story?.value?.alt}
);
})}
);
}