update user count query to exclude hidden users; enhance modal backdrop styling
Build Images and Deploy / Update-PROD-Stack (push) Successful in 1m20s
Build Images and Deploy / Update-PROD-Stack (push) Successful in 1m20s
This commit is contained in:
@@ -88,7 +88,7 @@ export function AdminUserActions({ user }: { user: UserData }) {
|
||||
</button>
|
||||
|
||||
{open && (
|
||||
<div className="fixed inset-0 z-50 bg-black/60 flex items-center justify-center p-4" onClick={() => setOpen(false)}>
|
||||
<div className="fixed inset-0 z-50 bg-black/80 backdrop-blur-sm flex items-center justify-center p-4" onClick={() => setOpen(false)}>
|
||||
<div
|
||||
className="bg-surface-card border border-surface-border rounded-xl p-6 w-full max-w-md space-y-4"
|
||||
onClick={(e) => e.stopPropagation()}
|
||||
@@ -125,11 +125,11 @@ export function AdminUserActions({ user }: { user: UserData }) {
|
||||
type="button"
|
||||
onClick={() => setHidden((h) => !h)}
|
||||
className={`relative inline-flex h-6 w-11 items-center rounded-full transition-colors ${
|
||||
hidden ? 'bg-slate-600' : 'bg-indigo-600'
|
||||
hidden ? 'bg-indigo-600' : 'bg-slate-600'
|
||||
}`}
|
||||
>
|
||||
<span className={`inline-block h-4 w-4 transform rounded-full bg-white transition-transform ${
|
||||
hidden ? 'translate-x-1' : 'translate-x-6'
|
||||
hidden ? 'translate-x-6' : 'translate-x-1'
|
||||
}`} />
|
||||
</button>
|
||||
</div>
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ export const revalidate = 0
|
||||
|
||||
async function getStats() {
|
||||
const [userCount, hashtagCount, tradeCount, topHashtags, recentTrades] = await Promise.all([
|
||||
prisma.user.count({ where: { isFund: false } }),
|
||||
prisma.user.count({ where: { isFund: false, isHidden: false } }),
|
||||
prisma.hashtag.count({ where: { isActive: true } }),
|
||||
prisma.trade.count(),
|
||||
// Top by current price (most active)
|
||||
|
||||
Reference in New Issue
Block a user