This commit is contained in:
10
src/lib/utils.ts
Normal file
10
src/lib/utils.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import type { Comment } from '@onecomme.com/onesdk/types/Comment';
|
||||
|
||||
export function authorColor(comment: Comment) {
|
||||
if (comment.service === 'youtube') {
|
||||
if (comment.data.isOwner) return 'text-yellow-300';
|
||||
if (comment.data.isModerator) return 'text-blue-300';
|
||||
if (comment.data.isMember) return 'text-green-300';
|
||||
}
|
||||
return 'text-zinc-200';
|
||||
}
|
||||
Reference in New Issue
Block a user