diff --git a/documentation/src/refine-theme/doc-survey-widget.tsx b/documentation/src/refine-theme/doc-survey-widget.tsx index 175a4fe4..a30fbe8f 100644 --- a/documentation/src/refine-theme/doc-survey-widget.tsx +++ b/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",