import React from 'react';
import { forEach } from 'lodash'

import ControllButton from '../controllButton';
import { getUniqueId } from '../../lib/utils';

const PreheatPresets = ({ presets, onClick }) => (
  <div>
    {Object.keys(presets).map(preset => {
      return (<div>
        <ControllButton onClick={() => { onClick(presets[preset].value); }}>{preset}</ControllButton>
      </div>);
    })}
  </div>
);

export default PreheatPresets;

import React from 'react';
import { forEach } from 'lodash'

import ControllButton from '../controllButton';
import { getUniqueId } from '../../lib/utils';

const PreheatPresets = ({ presets, onClick }) => (
  <div>
    {Object.keys(presets).map(preset => {
      return (<div>
        <ControllButton onClick={() => { onClick(presets[preset].value); }}>{presets[preset].name}</ControllButton>
      </div>);
    })}
  </div>
);

export default PreheatPresets;

Fix wrong name being used at temperature preset component
Fix wrong name being used at temperature preset component

