| import api from "../../../api/client"; | |
| import { ENDPOINTS } from "../../../api/endpoints"; | |
| export const NoteReactions = ({ | |
| noteId, | |
| reactions, | |
| }: { | |
| noteId: string; | |
| reactions: Record<string, string[]>; | |
| }) => { | |
| const handleReact = async (reaction: string) => { | |
| await api.post(ENDPOINTS.NOTES.REACT(noteId), { reaction }); | |
| }; | |
| return ( | |
| <div className="flex gap-2"> | |
| {["like", "important", "dislike"].map((r) => ( | |
| <button | |
| key={r} | |
| onClick={() => handleReact(r)} | |
| className="text-xs bg-white/5 px-2 py-1 rounded hover:bg-white/10 transition-colors" | |
| > | |
| {r} {reactions[r]?.length || 0} | |
| </button> | |
| ))} | |
| </div> | |
| ); | |
| }; | |
Xet Storage Details
- Size:
- 706 Bytes
- Xet hash:
- cfb92d453d0b431533e2a02a6d989f084229d44478289bed23ef8e56acdb0e1a
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.