MCPcopy Create free account
hub / github.com/dailydotdev/apps / publish

Function publish

packages/shared/src/components/shell/ShellBlock.tsx:325–335  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

323 useClientLayoutEffect(() => {
324 const element = ref.current;
325 const publish = () => {
326 // Out of the layout (see `gone`) it measures 0; the last height holds.
327 if (element && !element.getClientRects().length) {
328 return;
329 }
330 document.documentElement.style.setProperty(
331 '--shell-top',
332 `${element?.offsetHeight ?? 0}px`,
333 );
334 setShellEdge(element ? element.offsetTop + element.offsetHeight : 0);
335 };
336 publish();
337 const observer = element ? new ResizeObserver(publish) : undefined;
338 if (element) {

Callers 3

ShellBlockFunction · 0.70
onPublishFunction · 0.50
LfgComposerFunction · 0.50

Calls 1

setShellEdgeFunction · 0.90

Tested by

no test coverage detected