We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
locales/en.ts
faqs: { section1: [ { label: "faq1", value: "faq1" }, { label: "faq2", value: "faq2" }, ], section2: [{ label: "faq3", value: "faq3" }], },
//how to map this dynamic data in a component if you can share an example usage it would be very helpful. Thanks in advance
The text was updated successfully, but these errors were encountered:
same issue
Sorry, something went wrong.
exemple to resolve this :
`'use client'; import { GitHubLogoIcon, InstagramLogoIcon, LinkedInLogoIcon, TwitterLogoIcon } from '@radix-ui/react-icons'; import { useTranslations } from 'next-intl';
// Type des clés du dictionnaire type SocialKey = 'linkedin' | 'instagram' | 'twitter' | 'github';
// Composant SocialLinks const SocialLinks = ({ className }: { className?: string }) => { const b = useTranslations('social');
// Map des icônes associées à chaque réseau const icons: Record<SocialKey, JSX.Element> = { instagram: , linkedin: , twitter: , github : };
const socialKeys: SocialKey[] = ['linkedin', 'instagram', 'twitter', 'github'];
// Génération des liens return (
${key}.href
${key}.label
export default SocialLinks;`
No branches or pull requests
locales/en.ts
faqs: {
section1: [
{ label: "faq1", value: "faq1" },
{ label: "faq2", value: "faq2" },
],
section2: [{ label: "faq3", value: "faq3" }],
},
//how to map this dynamic data in a component if you can share an example usage it would be very helpful. Thanks in advance
The text was updated successfully, but these errors were encountered: