mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-11-11 21:12:09 +08:00
* refactor: unify Mihomo WS subscription with shared hook * refactor: relocate clash log hook and streamline services * docs: Changelog.md
14 lines
358 B
TypeScript
14 lines
358 B
TypeScript
import { useLocalStorage } from "foxact/use-local-storage";
|
|
|
|
const defaultConnectionSetting: IConnectionSetting = { layout: "table" };
|
|
|
|
export const useConnectionSetting = () =>
|
|
useLocalStorage<IConnectionSetting>(
|
|
"connections-setting",
|
|
defaultConnectionSetting,
|
|
{
|
|
serializer: JSON.stringify,
|
|
deserializer: JSON.parse,
|
|
},
|
|
);
|