i18n integration for showcase
Moved showcase carousel data source to respective i18n/ language files
This commit is contained in:
@ -8,6 +8,6 @@ const { title, description } = dictionary[Astro.currentLocale];
|
||||
|
||||
<SinglePage>
|
||||
<div class="flex flex-col h-screen">
|
||||
<ShowcaseTabs client:load />
|
||||
<ShowcaseTabs currentLocale={Astro.currentLocale} client:load />
|
||||
</div>
|
||||
</SinglePage>
|
||||
|
@ -12,20 +12,22 @@ import {
|
||||
TabsTrigger,
|
||||
} from "../components/ui/tabs";
|
||||
|
||||
import { data } from "../content/showcase";
|
||||
import { dictionary } from "../i18n/dictionary";
|
||||
|
||||
export function ShowcaseTabs() {
|
||||
|
||||
export function ShowcaseTabs({ currentLocale }) {
|
||||
const { showcase } = dictionary[currentLocale];
|
||||
return (
|
||||
<Tabs
|
||||
defaultValue={data[0].value}
|
||||
defaultValue={showcase[0].value}
|
||||
className="bottom-0 flex flex-col h-full my-auto"
|
||||
>
|
||||
<TabsList className={`grid w-full mt-4 grid-cols-${data.length}`}>
|
||||
{data.map((item) => (
|
||||
<TabsList className={`grid w-full mt-4 grid-cols-${showcase.length}`}>
|
||||
{showcase.map((item) => (
|
||||
<TabsTrigger value={item.value} key={item.value}>{item.handle}</TabsTrigger>
|
||||
))}
|
||||
</TabsList>
|
||||
{data.map((item) => (
|
||||
{showcase.map((item) => (
|
||||
<TabsContent value={item.value} className="h-full" key={item.value}>
|
||||
<Card className="h-[90%] my-auto">
|
||||
<CardHeader>
|
||||
|
Reference in New Issue
Block a user