Changeset ee05663 for frontend/src


Ignore:
Timestamp:
09/08/22 17:46:49 (2 years ago)
Author:
Nace Gjorgjievski <nace.gorgievski123@…>
Branches:
master
Children:
55ed171
Parents:
16237c4
Message:

Added Profile Updating

Location:
frontend/src
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • frontend/src/App.js

    r16237c4 ree05663  
    2020import CardPaymentScreen from "./screens/CardPaymentScreen";
    2121import OrderHistoryScreen from "./screens/OrderHistoryScreen";
     22import ProfileScreen from "./screens/ProfileScreen";
    2223
    2324function App() {
     
    4041        <Route path="placeorder/payment" element={<CardPaymentScreen />} />
    4142        <Route path="/orderhistory" element={<OrderHistoryScreen />} />
     43        <Route path="/profile" element={<ProfileScreen />} />
    4244        <Route path="/order/:id" element={<OrderScreen />} />
    4345        <Route path="/products" element={<CategoryScreen />} />
  • frontend/src/components/Header.js

    r16237c4 ree05663  
    8080    localStorage.removeItem("shippingAddress");
    8181    localStorage.removeItem("paymentMethod");
     82    window.location.href = "/signin";
    8283  };
    8384
     
    547548
    548549              <NavDropdown.Divider />
    549               <Link
     550              <NavDropdown.Item
    550551                className="drowdown-item"
    551552                to="#signout"
     
    553554              >
    554555                Одјави се
    555               </Link>
     556              </NavDropdown.Item>
    556557            </NavDropdown>
    557558          ) : (
  • frontend/src/screens/OrderHistoryScreen.js

    r16237c4 ree05663  
    7575            {orders.map((order) => (
    7676              <tr key={order._id}>
    77                 <td>{order._id.substring(0, 6)}</td>
     77                <td>{order._id.substring(0, 7)}</td>
    7878                <td>{order.createdAt.substring(0, 10)}</td>
    7979                <td>{order.totalPrice.toFixed(2)}</td>
Note: See TracChangeset for help on using the changeset viewer.