MCPcopy Create free account
hub / github.com/TheCSir/TerminalStart / AppContent

Function AppContent

src/App.tsx:105–264  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

103}
104
105function AppContent() {
106 const {
107 isThemeMakerOpen, setIsThemeMakerOpen,
108 todos, setTodos,
109 linkGroups,
110 statsMode,
111 weatherMode,
112 layouts, setLayouts,
113 tempUnit,
114 openInNewTab,
115 showWidgetTitles,
116 reserveSettingsSpace,
117 customFont,
118 funOptions,
119 marketConfig,
120 todoistConfig,
121 activeWidgets,
122 isLayoutLocked,
123 isResizingEnabled,
124 handleSaveCustomTheme,
125 removeExtraWidget,
126 isCrt
127 } = useAppContext();
128
129 const onLayoutChange = (_: Layout[], allLayouts: any) => {
130 setLayouts(allLayouts);
131 };
132
133 const showHandles = isResizingEnabled && !isLayoutLocked;
134
135 const appStyle = {
136 fontFamily: customFont ? customFont : '"JetBrains Mono", monospace'
137 };
138
139 const [gridReady, setGridReady] = useState(false);
140 const [isFirstLoad, setIsFirstLoad] = useState(true);
141
142 // briefly hide grid items while layout is computed, then suppress transitions
143 useEffect(() => {
144 const showTimer = setTimeout(() => setGridReady(true), 150);
145 const animTimer = setTimeout(() => setIsFirstLoad(false), 3000);
146 return () => {
147 clearTimeout(showTimer);
148 clearTimeout(animTimer);
149 };
150 }, []);
151
152 return (
153 <div
154 className={`min-h-screen w-full p-2 text-sm bg-[var(--color-bg)] relative overflow-hidden select-none ${isCrt ? 'theme-crt' : ''}`}
155 style={appStyle}
156 >
157
158 {isCrt && (
159 <>
160 <div className="crt-curve-container"></div>
161 <div className="crt-scanlines"></div>
162 <div className="crt-noise"></div>

Callers

nothing calls this directly

Calls 2

useAppContextFunction · 0.90
removeExtraWidgetFunction · 0.85

Tested by

no test coverage detected