Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const {
appLifecycle,
dependenciesRequest,
dispatch,
graphs,
layout,
layoutRequest,
paths,
} = props;
if (isEmpty(layoutRequest)) {
dispatch(getLayout());
} else if (layoutRequest.status === STATUS.OK) {
if (isEmpty(layout)) {
dispatch(setLayout(layoutRequest.content));
} else if (isNil(paths)) {
dispatch(computePaths({subTree: layout, startingPath: []}));
}
}
if (isEmpty(dependenciesRequest)) {
dispatch(getDependencies());
} else if (
dependenciesRequest.status === STATUS.OK &&
isEmpty(graphs)
) {
dispatch(computeGraphs(dependenciesRequest.content));
}
if (
// dependenciesRequest and its computed stores
dependenciesRequest.status === STATUS.OK &&
} = this.props
const {
rippleHeight,
rippleWidth,
rippleX,
rippleY,
} = this.state
const buttonClasses = classNames(
theme.button,
theme[fill],
theme[`${relevance}Relevance`],
theme[size],
{
[theme.iconButton]: !isNil(icon) && isNil(children),
[theme.circle]: !isNil(icon) && isNil(children) && circle,
[theme.hiddenChildren]: !displayChildrenWhenLoading && loading,
}
)
/* eslint-disable react/button-has-type */
return (
<button type="{type}" disabled="{disabled}">
{ this.shouldRenderIconAt('start') && icon }
{ this.renderLoaderSpinnerAt('start') }</button>
getRunNumber(runId, selectedRun, runs) {
if (!isNil(runId)) {
return runId;
}
if (!isNil(selectedRun)) {
return selectedRun;
}
if (runs.length) {
return runs.length - 1;
}
return 0;
}
isResponsive(props) {
const {config, figure, responsive} = props;
if (type(responsive) === 'Boolean') {
return responsive;
}
return Boolean(
config.responsive &&
(!figure.layout ||
((figure.layout.autosize ||
isNil(figure.layout.autosize)) &&
(isNil(figure.layout.height) ||
isNil(figure.layout.width))))
);
}
export const isNilOrEmpty = (v: any) => isNil(v) || isEmpty(v);
export const isToken = ({ type, value }) => !isNil(type) && !isNil(value);
exports.isExist = value => !R.isNil(value);
renderContent(
username: string,
profileInfo: ProfileGetResult,
profile: Profile,
currentStep: ?string
) {
const { children, profileProps } = this.props
if (R.isNil(profileInfo)) {
return ""
}
if (profileInfo.errorInfo !== undefined) {
return
}
return (
<div>
<div>
{makeProfileProgressDisplay(currentStep)}
</div>
<section>
{childrenWithProps(children, profileProps(profileInfo))}
</section>
</div>
{
[theme.iconButton]: !isNil(icon) && isNil(children),
[theme.circle]: !isNil(icon) && isNil(children) && circle,
}
)
return (
<button type="{type}" disabled="{disabled}">
{(!isNil(icon) && iconAlignment === 'start') && icon}
{!isNil(children) && children }
{(!isNil(icon) && iconAlignment === 'end') && icon}
</button>
)
}