Skip to content

Commit

Permalink
Merge pull request #3409 from osmosis-labs/fabryscript/add-empty-state
Browse files Browse the repository at this point in the history
[Order History]: Add empty state
  • Loading branch information
fabryscript authored Jun 26, 2024
2 parents bdce374 + c35b6ca commit ae3dce2
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions packages/web/components/complex/orders-history/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import {
useReactTable,
} from "@tanstack/react-table";
import { observer } from "mobx-react-lite";
import Image from "next/image";
import Link from "next/link";
import React, { useMemo } from "react";

import { Icon } from "~/components/assets";
Expand Down Expand Up @@ -76,6 +78,26 @@ export const OrderHistory = observer(() => {
);
}

if (orders.length === 0) {
return (
<div className="flex flex-col items-center justify-center gap-6">
<Image
src="/images/ion-thumbs-up.svg"
alt="ion thumbs up"
width={120}
height={80}
/>
<h6>No recent orders</h6>
<p className="body2 inline-flex items-center gap-1 text-osmoverse-300">
Your trade order history will appear here.
<Link href={"/"} className="text-wosmongton-300">
Start trading
</Link>
</p>
</div>
);
}

return (
<div className="mt-3 flex flex-col">
<table>
Expand Down

0 comments on commit ae3dce2

Please sign in to comment.