-
Notifications
You must be signed in to change notification settings - Fork 401
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c314b5a
commit dc5a4bd
Showing
2 changed files
with
34 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { getUser } from "@/lib/queries"; | ||
|
||
export async function OrderHistoryDynamic() { | ||
const user = await getUser(); | ||
return user ? ( | ||
<div className="border-t border-gray-200 pt-4"> | ||
<table className="w-full"> | ||
<thead> | ||
<tr className="text-left text-sm font-medium text-gray-500"> | ||
<th className="w-1/2 pb-2">Product</th> | ||
<th className="w-1/4 pb-2">Last Order Date</th> | ||
<th className="w-1/4 pb-2">Purchase Order</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<td colSpan={3} className="py-8 text-center text-gray-500"> | ||
You have no previous orders. | ||
<br /> | ||
When you place an order, it will appear here. | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
) : ( | ||
<p className="font-semibold text-black">Log in to view order history</p> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters