()
| 24 | const supabase = await createClient(); |
| 25 | |
| 26 | const invalidate = () => { |
| 27 | // Profile follower counts, the followed user's followers list, and |
| 28 | // the current user's following list must all reflect the change. |
| 29 | updateTag(`user-${slug}`); |
| 30 | updateTag(`followers-${userId}`); |
| 31 | updateTag(`following-${currentUserId}`); |
| 32 | // The members directory caches rows (incl. follower_count) under |
| 33 | // `users`. Background-refresh it like other ambient counters |
| 34 | // (see star-plugin) instead of synchronously flushing every |
| 35 | // users-tagged entry on each follow click. |
| 36 | revalidateTag("users", "max"); |
| 37 | }; |
| 38 | |
| 39 | if (action === "follow") { |
| 40 | const { error } = await supabase |
no outgoing calls
no test coverage detected