Skip to content

Commit

Permalink
Merge pull request #42 from pesto-students/development
Browse files Browse the repository at this point in the history
order history added in header
  • Loading branch information
tejas96 authored Dec 12, 2021
2 parents ed1a1d2 + 605832f commit 6e0bcd3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
6 changes: 6 additions & 0 deletions src/components/common/header/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
ABOUT,
CART,
HOME,
ORDER_HISTORY,
PRODUCT_LISTING,
SIGN_IN
} from '../../../router/types';
Expand Down Expand Up @@ -87,6 +88,11 @@ const Header = ({
Product
</Link>
</MenuItem>
<MenuItem>
<Link className="link" to={ORDER_HISTORY}>
Your Orders
</Link>
</MenuItem>
<MenuItem>
<Link className="link" to={ABOUT}>
About
Expand Down
10 changes: 5 additions & 5 deletions src/components/orderHistory/component.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react';
import { useSession } from '../../hooks';
import { Button, Footer, Header, NotFound } from '../common';
import { GenreicSkeleton } from '../common/skeleton';
import useOrderHistoryContainer from './container';
Expand All @@ -20,7 +21,8 @@ const OrderHistoryComponent = (props) => {
const { userHistory, handleRedirectToProductDetails } =
useOrderHistoryContainer();
const { loading: orderLoading, data: orderData } = userHistory;
console.log('orderData', userHistory);
const session = useSession();
const { user } = session;
return (
<>
<Header />
Expand All @@ -40,7 +42,7 @@ const OrderHistoryComponent = (props) => {
</HeaderMenue>
<HeaderMenue>
<Text>SHIP TO</Text>
<Text>Pesto</Text>
<Text>{user?.displayName}</Text>
</HeaderMenue>
<HeaderMenue>
<Text>ORDER # {order.orderId}</Text>
Expand All @@ -61,9 +63,7 @@ const OrderHistoryComponent = (props) => {
<img src={item?.files?.[0]} alt="product" />
</OrderImageContainer>
<OrderInfoContainer>
<Text>
<h5>{item.title}</h5>
</Text>
<Text bold>{item.title}</Text>
<Text numberOfLines={5}>{item.description}</Text>
</OrderInfoContainer>
</OrderImageAndDetials>
Expand Down

0 comments on commit 6e0bcd3

Please sign in to comment.