Merge pull request #2317 from eriese/eriese-rollback
Roll Back some changes to `useGist`
This commit is contained in:
commit
f59aea1ef4
5 changed files with 12 additions and 28 deletions
|
@ -9,6 +9,7 @@ const CoreSettingSaBool = props => {
|
|||
|
||||
const toggle = () => {
|
||||
props.setGist({
|
||||
...props.gist,
|
||||
saBool: !value,
|
||||
sa: value ? 0 : props.gist.saMm
|
||||
})
|
||||
|
|
|
@ -15,6 +15,7 @@ const CoreSettingMm = props => {
|
|||
|
||||
setValue(newVal)
|
||||
if (props.gist.sa) props.setGist({
|
||||
...props.gist,
|
||||
saMm: newVal,
|
||||
sa: newVal,
|
||||
})
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import MenuIcon from 'shared/components/icons/menu.js'
|
||||
import { linkClasses, Chevron } from 'shared/components/navigation/primary.js'
|
||||
import { useTranslation } from 'next-i18next'
|
||||
import defaultSettings from '../default-settings'
|
||||
import {defaultGist} from 'shared/hooks/useGist'
|
||||
|
||||
const View = props => {
|
||||
const { t } = useTranslation(['app'])
|
||||
|
@ -61,7 +61,7 @@ const View = props => {
|
|||
{
|
||||
name: 'clear',
|
||||
title: t('clearThing', { thing: 'YAML' }),
|
||||
onClick: () => props.clearGist()
|
||||
onClick: () => props.setGist(defaultGist(props.design, props.gist.locale))
|
||||
},
|
||||
]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue