瀏覽代碼

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",