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

Function publish

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

Source from the content-addressed store, hash-verified

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

Callers 3

ShellBlockFunction · 0.70
onPublishFunction · 0.50
LfgComposerFunction · 0.50

Calls 1

setShellEdgeFunction · 0.90

Tested by

no test coverage detected