Files
simple-chats/src/lib/utils.ts
0nepeop1e c575059570
All checks were successful
release / release (push) Successful in 37s
enhance youtube gift
2024-06-14 04:30:45 +08:00

11 lines
375 B
TypeScript

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';
}