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

Function ShellActions

packages/shared/src/components/shell/ShellPageContext.tsx:81–89  ·  view source on GitHub ↗
({
  children,
}: {
  children: ReactNode;
})

Source from the content-addressed store, hash-verified

79// An action that lives in a component apart from the one that speaks for
80// the page (a hero's menu) joins the block's actions from where it is.
81export const ShellActions = ({
82 children,
83}: {
84 children: ReactNode;
85}): ReactElement | null => {
86 const { actionsSlot } = useContext(ShellPageContext);
87
88 return actionsSlot ? createPortal(children, actionsSlot) : null;
89};
90
91// A page's own row of segments joins the block once it has scrolled behind
92// it. It is a second voice beside ShellPage because the hero and the tabs

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected