Skip to content

Commit f8ffadb

Browse files
committed
feat: rate operations without logging in
1 parent be173fe commit f8ffadb

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

src/components/viewer/OperationViewer.tsx

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ export const OperationViewer: ComponentType<{
118118
const levels = useLevels()?.data?.data || []
119119

120120
const [auth] = useAtom(authAtom)
121-
const authed = !!auth.token
122121

123122
// make eslint happy: we got Suspense out there
124123
if (!operation) return null
@@ -174,14 +173,6 @@ export const OperationViewer: ComponentType<{
174173
}
175174

176175
const handleRating = async (decision: OpRatingType) => {
177-
if (!authed) {
178-
AppToaster.show({
179-
message: '请先登录',
180-
intent: 'warning',
181-
})
182-
return
183-
}
184-
185176
// cancel rating if already rated by the same type
186177
if (decision === operation.ratingType) {
187178
decision = OpRatingType.None

0 commit comments

Comments
 (0)