MCPcopy Create free account
hub / github.com/dailydotdev/apps / useOpenQuestRefresh

Function useOpenQuestRefresh

packages/shared/src/hooks/useRefreshQuest.ts:163–182  ·  view source on GitHub ↗
({ targetId }: { targetId: TargetId })

Source from the content-addressed store, hash-verified

161};
162
163export 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};

Callers 2

CompactQuestListFunction · 0.90
QuestDropdownPanelFunction · 0.90

Calls 5

useLazyModalFunction · 0.90
useLogContextFunction · 0.90
logEventFunction · 0.85
getQuestRefreshLogExtraFunction · 0.85
openModalFunction · 0.85

Tested by

no test coverage detected