Skip to content

armgit / mso

Public Imported from GitHub
0

Browser-based graphical shell and control plane for a Linux server you own — real terminal, file manager, live metrics and BYOK AI in one mobile-first workspace. Next.js 16 · React 19 · node-pty · Tailwind v4 · shadcn/ui. Public alpha, self-hosted.

643 B
Raw Blame
"use client";

import { useSyncExternalStore } from "react";
import {
  getIconStyleServerSnapshot,
  getIconStyleSnapshot,
  setIconStyle,
  subscribeIconStyle,
  type Style,
} from "./style-core";

export { readIconStyle, setIconStyle, type Style } from "./style-core";

/** Server snapshot is the default, so hydration never mismatches; the client
 *  snapshot takes over immediately after. No mount flag needed. */
export function useIconStyle(): [Style, (next: Style) => void] {
  const style = useSyncExternalStore(
    subscribeIconStyle,
    getIconStyleSnapshot,
    getIconStyleServerSnapshot,
  );
  return [style, setIconStyle];
}