import { observer } from "mobx-react-lite"; import styles from "./Panes.module.scss"; import { Text } from "preact-i18n"; import { Checkbox, Column } from "@revoltchat/ui"; import { useApplicationState } from "../../../mobx/State"; import { SyncKeys } from "../../../mobx/stores/Sync"; export const Sync = observer(() => { const sync = useApplicationState().sync; return (
{/*

Sync items automatically
*/}

{( [ ["appearance", "appearance.title"], ["theme", "appearance.theme"], ["locale", "language.title"], // notifications sync is always-on ] as [SyncKeys, string][] ).map(([key, title]) => ( } description={ } onChange={() => sync.toggle(key)} /> ))} {/*
Last sync at 12:00
*/}
); });