fix(shared): Adjust <DesignInfo> to accommodate designs with no options
This commit is contained in:
parent
b9f1ef7a08
commit
b4db97c5e5
1 changed files with 12 additions and 5 deletions
|
@ -111,9 +111,11 @@ export const DesignInfo = ({ design, docs = false, workbench = false, modal = fa
|
||||||
<li>
|
<li>
|
||||||
<DocsLink site="org" slug={`docs/designs/${design}/fabric`} />
|
<DocsLink site="org" slug={`docs/designs/${design}/fabric`} />
|
||||||
</li>
|
</li>
|
||||||
<li>
|
{Object.keys(config.options).length > 0 ? (
|
||||||
<DocsLink site="org" slug={`docs/designs/${design}/options`} />
|
<li>
|
||||||
</li>
|
<DocsLink site="org" slug={`docs/designs/${design}/options`} />
|
||||||
|
</li>
|
||||||
|
) : null}
|
||||||
<li>
|
<li>
|
||||||
<DocsLink site="org" slug={`docs/designs/${design}/notes`} />
|
<DocsLink site="org" slug={`docs/designs/${design}/notes`} />
|
||||||
</li>
|
</li>
|
||||||
|
@ -352,8 +354,12 @@ export const DesignInfo = ({ design, docs = false, workbench = false, modal = fa
|
||||||
</>
|
</>
|
||||||
) : null}
|
) : null}
|
||||||
|
|
||||||
<h6 className="mt-4">{t('account:designOptions')}</h6>
|
{Object.keys(config.options).length > 0 ? (
|
||||||
<SimpleOptionsList options={config.options} t={t} design={design} />
|
<>
|
||||||
|
<h6 className="mt-4">{t('account:designOptions')}</h6>
|
||||||
|
<SimpleOptionsList options={config.options} t={t} design={design} />
|
||||||
|
</>
|
||||||
|
) : null}
|
||||||
|
|
||||||
<h6 className="mt-4">{t('account:parts')}</h6>
|
<h6 className="mt-4">{t('account:parts')}</h6>
|
||||||
<ul className="list list-disc list-inside pl-2">
|
<ul className="list list-disc list-inside pl-2">
|
||||||
|
@ -361,6 +367,7 @@ export const DesignInfo = ({ design, docs = false, workbench = false, modal = fa
|
||||||
<li key={part}>{part}</li>
|
<li key={part}>{part}</li>
|
||||||
))}
|
))}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
{Object.keys(config.plugins).length > 0 ? (
|
{Object.keys(config.plugins).length > 0 ? (
|
||||||
<>
|
<>
|
||||||
<h6 className="mt-4">{t('account:plugins')}</h6>
|
<h6 className="mt-4">{t('account:plugins')}</h6>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue