/home/vianto5/heredit.mx/wp-content/plugins/code-snippets/js/components/WelcomeMenu
Edit: /home/vianto5/heredit.mx/wp-content/plugins/code-snippets/js/components/WelcomeMenu/WelcomeMenu.tsx (3315B)
import { __, sprintf } from '@wordpress/i18n'
import React, { useState } from 'react'
import { Toolbar } from '../common/Toolbar'
import { Changelog } from './Changelog'
import type { ImageLinkSchema } from '../../types/schema/WelcomeSchema'
const DATA = window.CODE_SNIPPETS_WELCOME
const HeroImage = () => {
const [isImageLoaded, setImageLoaded] = useState(false)
return (
{!isImageLoaded && }
setImageLoaded(true)}
/>
)
}
interface PartnersProps {
partners: ImageLinkSchema[]
}
const Partners: React.FC
= ({ partners }) =>
<>
{__('Exclusive deals from our partners', 'code-snippets')}
{partners.map(({ title, follow_url, image_url }) =>
-
)}
>
interface ArticlesProps {
articles: ImageLinkSchema[]
}
const Articles: React.FC = ({ articles }) =>
<>
{__('Helpful articles', 'code-snippets')}
{articles.map(({ title, follow_url, image_url, description, category }) =>
-
)}
>
export const WelcomeMenu = () =>
<>
{__('Resources and Updates', 'code-snippets')}
{DATA?.features &&
}
{DATA?.partners &&
}
>