Formatting

This commit is contained in:
Tanner Collin 2022-07-11 07:31:33 +00:00
parent 4ff5c60685
commit c6d065b607

View File

@ -473,7 +473,9 @@ export function ICalButtons(props) {
const pref = 'calendarPreference'; const pref = 'calendarPreference';
let defaultSelection = options[0]; let defaultSelection = options[0];
let savedPreference = localStorage.getItem(pref); let savedPreference = localStorage.getItem(pref);
if (savedPreference != null) defaultSelection = options.filter(x => x.value === savedPreference)[0]; if (savedPreference != null) {
defaultSelection = options.filter(x => x.value === savedPreference)[0];
}
const [selectedOption, setOption] = useState(defaultSelection); const [selectedOption, setOption] = useState(defaultSelection);
@ -493,8 +495,9 @@ export function ICalButtons(props) {
<Button.Group> <Button.Group>
<Button <Button
loading={loading} loading={loading}
onClick={selectedOption.action}> onClick={selectedOption.action}
<Icon name={selectedOption.icon} />{selectedOption.text} >
<Icon name={selectedOption.icon} />{selectedOption.text}
</Button> </Button>
<Dropdown <Dropdown
className='button icon' className='button icon'