redesign and fixes
This commit is contained in:
@@ -260,9 +260,13 @@ export default function NewRestaurant() {
|
||||
};
|
||||
|
||||
const handleDescriptionChange = (event) => {
|
||||
let stringLength = event.target.value.length;
|
||||
let charleft = 400 - stringLength;
|
||||
setState({ ...state, description: event.target.value, charLeft: charleft });
|
||||
const stringLength = event.target.value.length;
|
||||
const charleft = 400 - stringLength;
|
||||
if(stringLength <= 400){
|
||||
setState({ ...state, description: event.target.value, charLeft: charleft, descriptionError: false });
|
||||
} else {
|
||||
setState({ ...state, description: event.target.value, charLeft: charleft, descriptionError: true });
|
||||
}
|
||||
};
|
||||
|
||||
const handlePreviousButton = () => {
|
||||
|
||||
Reference in New Issue
Block a user