Merge pull request #100 from toeverything/fix/disable-reading-mode

fix: disable reading mode
This commit is contained in:
wang xinglong 2022-08-05 14:14:30 +08:00 committed by GitHub
commit 96dd670621
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,7 +9,7 @@ import {
importWorkspace, importWorkspace,
exportWorkspace, exportWorkspace,
useWorkspaceAndPageId, useWorkspaceAndPageId,
useReadingMode, // useReadingMode,
clearWorkspace, clearWorkspace,
} from './util'; } from './util';
@ -63,20 +63,20 @@ export const useSettings = (): SettingItem[] => {
const { workspaceId, pageId } = useWorkspaceAndPageId(); const { workspaceId, pageId } = useWorkspaceAndPageId();
const navigate = useNavigate(); const navigate = useNavigate();
const settingFlags = useSettingFlags(); const settingFlags = useSettingFlags();
const { toggleReadingMode, readingMode } = useReadingMode(); // const { toggleReadingMode, readingMode } = useReadingMode();
const settings: SettingItem[] = [ const settings: SettingItem[] = [
{ // {
type: 'switch', // type: 'switch',
name: 'Reading Mode', // name: 'Reading Mode',
value: readingMode, // value: readingMode,
onChange: () => { // onChange: () => {
toggleReadingMode(); // toggleReadingMode();
}, // },
}, // },
{ // {
type: 'separator', // type: 'separator',
}, // },
{ {
type: 'button', type: 'button',
name: 'Duplicate Page', name: 'Duplicate Page',