from pathlib import Path import streamlit.components.v1 as components _COMPONENT_DIR = Path(__file__).resolve().parent / "browser_time_component" _browser_time_component = components.declare_component( "browser_time_component", path=str(_COMPONENT_DIR), ) def get_browser_time(key: str = "browser_time_component") -> str | None: return _browser_time_component(key=key, default=None)