mirror of
https://github.com/docmost/docmost.git
synced 2025-11-12 17:42:36 +10:00
Improves user experience by allowing users to return to the previous page after visiting the Settings section. Co-authored-by: Philipinho <16838612+Philipinho@users.noreply.github.com>
11 lines
275 B
TypeScript
11 lines
275 B
TypeScript
import { atom, WritableAtom } from "jotai";
|
|
|
|
export const settingsOriginAtom: WritableAtom<string | null, [string | null], void> = atom(
|
|
null,
|
|
(get, set, newValue) => {
|
|
if (get(settingsOriginAtom) !== newValue) {
|
|
set(settingsOriginAtom, newValue);
|
|
}
|
|
}
|
|
);
|