
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
api-modal-for-react
Advanced tools
> A modal component for displaying API responses in React. This package is part of the OpenClassrooms' Front-End Developer path. It is not meant to be used outside of this context. Once the path is completed, and the project validated, this package won't
A modal component for displaying API responses in React. This package is part of the OpenClassrooms' Front-End Developer path. It is not meant to be used outside of this context. Once the path is completed, and the project validated, this package won't be maintained.
npm install api-modal-for-react
import Modal from 'api-modal-module';
const App = () => {
// Variables for the Modal Node Package
const [showModal, setShowModal] = useState({ display: 'none' });
const [apiResponse, setApiResponse] = useState({ status: 418, statusText: "I'm a teapot", data: {} });
const [redirectPath, setRedirectPath] = useState('/');
return (
<div>
<Modal apiResponse={apiResponse} modal__display={showModal} />
<div>Modal Content</div>
</Modal>
</div>
);
};
| Prop Name | Type | Description |
| ---------------- | ------ | -------------------------------------------------- | ----------------------------------------------------------- |
| apiResponse | object | The response from the API call. | e.g.: { status: 418, statusText: "I'm a teapot", data: {} } |
| modal\display | object | The display property for the modal. | e.g.: { display: 'flex'/'none' }, |
| redirectPath | string | The path to redirect to after the modal is closed. | e.g.: '/' |
MIT © Anoerak
FAQs
> A modal component for displaying API responses in React. This package is part of the OpenClassrooms' Front-End Developer path. It is not meant to be used outside of this context. Once the path is completed, and the project validated, this package won't
We found that api-modal-for-react demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.