Skip to content

Commit 8ba0172

Browse files
committed
fix eslint
1 parent c92be8f commit 8ba0172

4 files changed

Lines changed: 12 additions & 7 deletions

File tree

Cargo.lock

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,8 @@ base64 = "0.22.1"
106106

107107
utoipa = { version = "5.5.0", features = ["chrono"] }
108108
utoipa-axum = "0.2.0"
109-
utoipa-swagger-ui = "9.0.2"
109+
# vendored: ship Swagger UI from crates.io so CI/airgapped builds don't curl github.com
110+
utoipa-swagger-ui = { version = "9.0.2", features = ["vendored"] }
110111
tempfile = "3.27.0"
111112
dashmap = "6.2.1"
112113
once_cell = "1.21.4"

moon/apps/web/components/UserSettings/AccountReview/AccountReviewSection.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { useMemo, useState } from 'react'
1+
import { useState } from 'react'
22

33
import type { UserApprovalStatusRes } from '@gitmono/types'
44
import { Avatar, Button, Table, TableRow, UIText } from '@gitmono/ui'
@@ -60,10 +60,7 @@ export function AccountReviewSection() {
6060
const reject = useRejectUser()
6161

6262
const users = data?.data?.items ?? []
63-
const pendingCount = useMemo(() => {
64-
if (filter === 'pending') return users.length
65-
return users.filter((user) => user.status === 'pending').length
66-
}, [filter, users])
63+
const pendingCount = filter === 'pending' ? users.length : users.filter((user) => user.status === 'pending').length
6764

6865
return (
6966
<SettingsSection.Section className='shadow-sm'>

moon/apps/web/components/UserSettings/PageWrapper.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export function UserSettingsPageWrapper(props: Props) {
6767
>
6868
Account review
6969
{pendingCount > 0 && (
70-
<span className='ml-1 inline-flex h-4.5 min-w-4.5 items-center justify-center rounded-full bg-amber-500 px-1.5 font-mono text-[10px] font-semibold leading-none text-white'>
70+
<span className='h-4.5 min-w-4.5 ml-1 inline-flex items-center justify-center rounded-full bg-amber-500 px-1.5 font-mono text-[10px] font-semibold leading-none text-white'>
7171
{pendingCount}
7272
</span>
7373
)}

0 commit comments

Comments
 (0)