mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-10-26 19:01:39 -04:00
Displaying header icon for calculators.
This commit is contained in:
parent
a879e43c73
commit
e0cc698ee2
1 changed files with 3 additions and 3 deletions
|
|
@ -234,10 +234,10 @@ export function CalculatorsPage() {
|
|||
const activeCalculator = calc ?
|
||||
calculators.filter(i => i.key === calc)[0]
|
||||
: null;
|
||||
const {button, title, contents} = activeCalculator || {};
|
||||
const {icon, button, title, contents} = activeCalculator || {};
|
||||
|
||||
const name = title || button + ' Calculator';
|
||||
const header = activeCalculator ? name : 'Calculators';
|
||||
const header = activeCalculator ? <Header><Icon name={icon}/>{name}</Header> : <Header>Calculators</Header>;
|
||||
useTitle(header);
|
||||
|
||||
const calculatorButtons = calculators.map(i => {
|
||||
|
|
@ -256,7 +256,7 @@ export function CalculatorsPage() {
|
|||
|
||||
// TODO add Breadcrumb here.
|
||||
return <>
|
||||
<Header>{header}</Header>
|
||||
{header}
|
||||
{body}
|
||||
</>
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue