1
0
Fork 0

Merge pull request #2317 from eriese/eriese-rollback

Roll Back some changes to `useGist`
This commit is contained in:
Joost De Cock 2022-06-29 13:39:23 +02:00 committed by GitHub
commit f59aea1ef4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 12 additions and 28 deletions

View file

@ -9,6 +9,7 @@ const CoreSettingSaBool = props => {
const toggle = () => {
props.setGist({
...props.gist,
saBool: !value,
sa: value ? 0 : props.gist.saMm
})

View file

@ -15,6 +15,7 @@ const CoreSettingMm = props => {
setValue(newVal)
if (props.gist.sa) props.setGist({
...props.gist,
saMm: newVal,
sa: newVal,
})

View file

@ -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))
},
]