|
|
@ -99,7 +99,7 @@ export default function OffersTable({
|
|
|
|
|
|
|
|
|
|
|
|
function renderFilters() {
|
|
|
|
function renderFilters() {
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<div className="flex items-center justify-between p-4 text-sm sm:grid-cols-4 md:text-base">
|
|
|
|
<div className="flex items-center justify-between p-4 text-xs text-slate-700 sm:grid-cols-4 sm:text-sm md:text-base">
|
|
|
|
<DropdownMenu
|
|
|
|
<DropdownMenu
|
|
|
|
align="start"
|
|
|
|
align="start"
|
|
|
|
label={
|
|
|
|
label={
|
|
|
@ -204,13 +204,13 @@ export default function OffersTable({
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<thead className="text-slate-700">
|
|
|
|
<thead className="font-semibold">
|
|
|
|
<tr className="divide-x divide-slate-200">
|
|
|
|
<tr className="divide-x divide-slate-200">
|
|
|
|
{columns.map((header, index) => (
|
|
|
|
{columns.map((header, index) => (
|
|
|
|
<th
|
|
|
|
<th
|
|
|
|
key={header}
|
|
|
|
key={header}
|
|
|
|
className={clsx(
|
|
|
|
className={clsx(
|
|
|
|
'bg-slate-100 py-3 px-4',
|
|
|
|
'whitespace-nowrap bg-slate-100 py-3 px-4',
|
|
|
|
// Make last column sticky.
|
|
|
|
// Make last column sticky.
|
|
|
|
index === columns.length - 1 &&
|
|
|
|
index === columns.length - 1 &&
|
|
|
|
'sticky right-0 drop-shadow md:drop-shadow-none',
|
|
|
|
'sticky right-0 drop-shadow md:drop-shadow-none',
|
|
|
@ -239,7 +239,7 @@ export default function OffersTable({
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
) : (
|
|
|
|
) : (
|
|
|
|
<div className="overflow-x-auto text-slate-600">
|
|
|
|
<div className="overflow-x-auto text-slate-600">
|
|
|
|
<table className="w-full divide-y divide-slate-200 border-y border-slate-200 text-left">
|
|
|
|
<table className="w-full divide-y divide-slate-200 border-y border-slate-200 text-left text-xs text-slate-700 sm:text-sm md:text-base">
|
|
|
|
{renderHeader()}
|
|
|
|
{renderHeader()}
|
|
|
|
<tbody>
|
|
|
|
<tbody>
|
|
|
|
{offers.map((offer) => (
|
|
|
|
{offers.map((offer) => (
|
|
|
@ -250,7 +250,7 @@ export default function OffersTable({
|
|
|
|
{!offers ||
|
|
|
|
{!offers ||
|
|
|
|
(offers.length === 0 && (
|
|
|
|
(offers.length === 0 && (
|
|
|
|
<div className="py-16 text-lg">
|
|
|
|
<div className="py-16 text-lg">
|
|
|
|
<div className="flex justify-center">No data yet 🥺</div>
|
|
|
|
<div className="flex justify-center">No data yet🥺</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
))}
|
|
|
|
))}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|