import React from 'react' import Page from 'site/components/wrappers/page.js' import useApp from 'site/hooks/useApp.js' import Head from 'next/head' import Link from 'next/link' import { useTranslation } from 'next-i18next' import { defaultVersion, formatVersionTitle, formatVersionUri } from 'site/components/version-picker.js' import TutorialIcon from 'shared/components/icons/tutorial.js' import DesignIcon from 'shared/components/icons/design.js' import BoxIcon from 'shared/components/icons/box.js' import CogIcon from 'shared/components/icons/cog.js' import Layout from 'site/components/layouts/bare' import { PageTitle, Breadcrumbs } from 'site/components/wrappers/layout' const links = (section, list, version) => list.map(design => (
  • {design}
  • )) export const default_icons = { accessories: (className='') => , blocks: (className='') => , garments: (className='') => , utilities: (className='') => , } const Section = ({ section, version, patterns, icons }) => { const { t } = useTranslation(['patterns']) return patterns.map(design => (
    {design.__title} {icons[section] && icons[section]("w-12 h-12 md:h-20 md:w-20 xl:w-32 xl:h-32 shrink-0")}
    {t(`patterns:${design.__order}.d`)}
    )) } const PatternListPageTemplate = ({ section=false, version=false, icons=default_icons }) => { const app = useApp() const { t } = useTranslation(['app']) const title = section ? app.navigation[section].__title : t('designs') const sectionPatterns = section ? Object.values(app.navigation[section]).filter((o)=> typeof o == 'object') : []; return (
    { section ? (
    ) : Object.keys(app.patterns).map(section => (

    {app.navigation[section].__title}

    )) }
    ) } export default PatternListPageTemplate