import React, { useEffect } from 'react' import { Link } from 'react-router-dom' import { useStore } from '@nanostores/react' import { isStandbyStore, currentTimeStore, weatherStore, showChoicesStore, showSettingsModalStore, isVisibleStore, yenBalanceStore, documentUiEnabledStore, toggleStandby, toggleShowChoices, updateTime, setDocumentUiEnabled, } from '../stores' interface VNInterfaceProps { onLogout: () => void } export function VNInterface({ onLogout }: VNInterfaceProps) { const isStandby = useStore(isStandbyStore) const currentTime = useStore(currentTimeStore) const weather = useStore(weatherStore) const showChoices = useStore(showChoicesStore) const showSettingsModal = useStore(showSettingsModalStore) const isVisible = useStore(isVisibleStore) const yenBalance = useStore(yenBalanceStore) const documentUiEnabled = useStore(documentUiEnabledStore) // Fade in effect on mount useEffect(() => { const timer = setTimeout(() => { isVisibleStore.set(true) }, 100) return () => clearTimeout(timer) }, []) // Update clock every second (Japan Time) useEffect(() => { const timer = setInterval(() => { const now = new Date() // Convert to Japan Time (UTC+9) const japanTime = new Date(now.getTime() + (now.getTimezoneOffset() * 60000) + (9 * 3600000)) updateTime() }, 1000) return () => clearInterval(timer) }, []) return (
Replace the directive management interface with an interactive document editor. This is a proof of concept.
{documentUiEnabled && ( showSettingsModalStore.set(false)} > Open Directives Editor {'\u2192'} )}