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

Function isTabActive

packages/shared/src/components/tabs/TabContainer.tsx:173–185  ·  view source on GitHub ↗
({
    props: { url, label },
  }: ReactElement<TabProps<T>>)

Source from the content-addressed store, hash-verified

171 });
172
173 const isTabActive = ({
174 props: { url, label },
175 }: ReactElement<TabProps<T>>) => {
176 if (controlledActive) {
177 return label === currentActive;
178 }
179
180 if (url) {
181 return currentPath === url;
182 }
183
184 return label === currentActive;
185 };
186
187 const renderSingleComponent = () => {
188 if (!shouldMountInactive) {

Callers 1

TabContainerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected