In short, what I want to do is: I open a pop-up. There are 3 options. add to cart, auto add serial number and cancel. If the input is empty, I want the add to cart button to return an error and the screen not to turn off.
If the serial number is not entered in the input, I just want to show notification when the add to cart button is pressed. It's okay to show notification. But the pop-up screen closes. The window closes because onPress returns a void type.
In short, what I want to do is: I open a pop-up. There are 3 options. add to cart, auto add serial number and cancel. If the input is empty, I want the add to cart button to return an error and the screen not to turn off.
If the serial number is not entered in the input, I just want to show notification when the add to cart button is pressed. It's okay to show notification. But the pop-up screen closes. The window closes because onPress returns a void type.