({ targetId }: { targetId: TargetId })
| 161 | }; |
| 162 | |
| 163 | export const useOpenQuestRefresh = ({ targetId }: { targetId: TargetId }) => { |
| 164 | const { openModal } = useLazyModal(); |
| 165 | const { logEvent } = useLogContext(); |
| 166 | |
| 167 | return useCallback( |
| 168 | (quest: UserQuest) => { |
| 169 | logEvent({ |
| 170 | event_name: LogEvent.OpenQuestRefresh, |
| 171 | target_id: targetId, |
| 172 | target_type: TargetType.Quest, |
| 173 | extra: JSON.stringify(getQuestRefreshLogExtra(quest)), |
| 174 | }); |
| 175 | openModal({ |
| 176 | type: LazyModal.QuestRefresh, |
| 177 | props: { quest, targetId }, |
| 178 | }); |
| 179 | }, |
| 180 | [logEvent, openModal, targetId], |
| 181 | ); |
| 182 | }; |
no test coverage detected