File size: 400 Bytes
57e2194 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | 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)
|