Changeset db39d9e for my-react-app


Ignore:
Timestamp:
03/05/24 14:27:53 (15 months ago)
Author:
Aleksandar Panovski <apano77@…>
Branches:
main
Children:
8ca35dc
Parents:
5a9c93b
Message:

Authorization layer

Location:
my-react-app/src/components
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • my-react-app/src/components/AppContent.js

    r5a9c93b rdb39d9e  
    2727            "POST",
    2828            "/api/login",
    29             {login: email, password: password}
     29            {email: email, password: password}
    3030        ).then((response) => {
    3131            this.setState({componentToShow: "restaurants"})
     
    4444                firstName: firstName,
    4545                lastName: lastName,
    46                 login: email,
     46                email: email,
    4747                password: password
    4848            }
  • my-react-app/src/components/AuthContent.js

    r5a9c93b rdb39d9e  
    2828                        <p>Cuisine Type: {restaurant.cuisineType}</p>
    2929                        <p>Address: {restaurant.address}</p>
    30                         {/* Render other properties as needed */}
     30
    3131                    </div>
    3232                ))}
  • my-react-app/src/components/LoginForm.js

    r5a9c93b rdb39d9e  
    5858                            <form onSubmit={this.onSubmitLogin}>
    5959                                <div className="form-outline mb-4">
    60                                     <input type="login" id="loginEmail" name="login" className="form-control" onChange={this.onChangeHandler}/>
    61                                     <label className="form-label" htmlFor="loginEmail">Email</label>
     60                                    <input type="email" id="email" name="email" className="form-control" onChange={this.onChangeHandler}/>
     61                                    <label className="form-label" htmlFor="email">Email</label>
    6262                                </div>
    6363                                <div className="form-outline mb-4">
Note: See TracChangeset for help on using the changeset viewer.