Skip to content

Commit

Permalink
fix: Add fallback emoji
Browse files Browse the repository at this point in the history
  • Loading branch information
noahonyejese committed Sep 19, 2024
1 parent 6eaf4f8 commit 494feed
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/api/slack/events/conversations/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const POST = async (req: NextRequest) => {

if (userData) {
// Update the last reaction timestamp
const reactionEmoji = emoji.get(event.reaction) || event.reaction;
const reactionEmoji = emoji.get(event.reaction) || '❌';
await userRef.update({
...userData,
reactions: userData.reactions ? userData.reactions + 1 : 1,
Expand Down
23 changes: 20 additions & 3 deletions components/team-communication/TeamCommunication.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,15 @@ const TeamCommunication: FC = () => {
textAnchor={'center'}
fontFamily={type === 'reaction' ? 'Apple Color Emoji' : 'Arial'}
fontWeight={300}
fontSize={width < 768 ? 12 : 16}
fontSize={
type === 'reaction'
? width < 768
? 96
: 128
: width < 768
? 12
: 16
}
initial={{
x: node.x - getTextWidth(node.name) / 2,
y: node.y,
Expand All @@ -436,15 +444,24 @@ const TeamCommunication: FC = () => {
animate={{
y: active === node.id ? node.y - node.radius - 20 : node.y,
opacity: active === node.id ? 1 : 0,
fontSize: active === node.id ? (width < 768 ? 12 : 16) : 0,
fontSize:
active === node.id
? type === 'reaction'
? width < 768
? 96
: 128
: width < 768
? 12
: 16
: 0,
}}
onAnimationComplete={() =>
setTimeout(() => {
setActive('');
}, 2000)
}
transition={{
duration: 1.5,
duration: 1,
ease: easingCubic,
}}
>
Expand Down

0 comments on commit 494feed

Please sign in to comment.