소스 검색

Update doc-survey-widget.tsx

Stefan Pejcic 1 년 전
부모
커밋
160d5c9396
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      documentation/src/refine-theme/doc-survey-widget.tsx

+ 4 - 0
documentation/src/refine-theme/doc-survey-widget.tsx

@@ -299,6 +299,10 @@ const SurveyFinished = (props: {
     );
 };
 
+const generateRandomSurveyId = () => {
+    return Math.random().toString(36).substring(7);
+};
+
 const createSurvey = async ({ body }: { body: DocSurveyCreateDto }) => {
     const response = await fetch(`${DOC_SURVEY_URL}?surveyId=${generateRandomSurveyId()}`, {
         method: "POST",