Modal repair in React

Closed job
SomethingGreenOnline
SomethingGreenOnline
Employer
124 deals
Job category:
Desktop/web applications
Expected budget:

Negotiable

Preferable skills:
Published:
Finished

Job description

I am trying to implement a modal https://dev.to/alexandprivate/your-next-react-modal-with-your-own-usemodal-hook-context-api-3jg7 in an application in react.

The modal is supposed to appear only for users who are logged in.

I can retrieve the information if the user is logged in by usingSelector redux.

I have a problem with customizing this component to, work without the click on button.

I want to edit it so that:

-automatically open the modal as soon as the user does the login && useMediaQuery('(max-width: 1279px)') - i.e. for mobile only...

-as user clicks confirmation (button inside modal) it saves info to localstorage that there is alert acceptance

-if there is this info in localstorage, it does not show this modal

-if the info is not there, it shows the modal

-save the functionality to open the modal with a button (as it is in the example) so for the future, e.g. by passing the appropriate prop, it shows the modal.

please help

Required functions:

Submitted offers 2

Add your offer or ask the client for more details