Skip to content

Commit 74e212b

Browse files
committed
feat: 피드백 요청 시 구글 폼 창 띄우기
1 parent 4d9ddc2 commit 74e212b

File tree

3 files changed

+8
-44
lines changed

3 files changed

+8
-44
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,11 @@
1-
import TOLD from '@business/services/TOLD';
2-
3-
import { useOverlay } from './overlay';
1+
import { feedbackForm } from '@constants/urls';
42

53
interface UserFeedbackPrams {
6-
type: 'AI' | 'HUMAN';
4+
type: keyof typeof feedbackForm;
75
}
86

97
export function useUserFeedback({ type }: UserFeedbackPrams) {
10-
const { openOverlay } = useOverlay();
11-
12-
const displayForm = () => {
13-
TOLD.displayForm(type);
14-
15-
openOverlay(({ closeOverlay }) => {
16-
const interval = setInterval(() => {
17-
if (TOLD.isFormVisible()) {
18-
closeOverlay();
19-
clearInterval(interval);
20-
}
21-
}, 1000);
22-
23-
return (
24-
<div className="w-h-screen flex-with-center">
25-
<span className="loading loading-spinner loading-lg"></span>
26-
</div>
27-
);
28-
});
29-
};
8+
const displayForm = () => window.open(feedbackForm[type], '_blank');
309

3110
return { displayForm };
3211
}

frontend/src/business/services/TOLD.ts

-20
This file was deleted.

frontend/src/constants/urls.ts

+5
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,8 @@ export const iceServers = [
55
'stun:stun3.l.google.com:19302',
66
'stun:stun4.l.google.com:19302',
77
];
8+
9+
export const feedbackForm = {
10+
AI: 'https://forms.gle/WRag3fA8SsZhPNRT6',
11+
HUMAN: 'https://forms.gle/adqDfMeL1ki28txV7',
12+
};

0 commit comments

Comments
 (0)