Few tweaks before merge

This commit is contained in:
Kurt Hutten
2021-01-24 13:12:08 +11:00
parent 02032c2804
commit a21cc0a75f
3 changed files with 15 additions and 2 deletions

View File

@@ -3,6 +3,7 @@ import { navigate, routes } from '@redwoodjs/router'
import { useAuth } from '@redwoodjs/auth'
import PartProfile from 'src/components/PartProfile'
import { QUERY as PART_REACTION_QUERY } from 'src/components/PartReactionsCell/PartReactionsCell'
export const QUERY = gql`
query FIND_PART_BY_USERNAME_TITLE(
@@ -156,6 +157,12 @@ export const Success = ({ userPart, variables: { isEditable }, refetch }) => {
const [toggleReaction] = useMutation(TOGGLE_REACTION_MUTATION, {
onCompleted: () => refetch(),
refetchQueries: [
{
query: PART_REACTION_QUERY,
variables: { partId: userPart?.Part?.id },
},
],
})
const onReaction = (emote) =>
toggleReaction({