From e0d6a0b974ad2210af128a03ed6288291c19179f Mon Sep 17 00:00:00 2001 From: Yarden Shoham Date: Thu, 8 Dec 2022 11:54:37 +0000 Subject: [PATCH] Simplify logic Signed-off-by: Yarden Shoham --- web/src/components/SubscribeDialog.js | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/web/src/components/SubscribeDialog.js b/web/src/components/SubscribeDialog.js index eb0f6ae8..30e4a3c2 100644 --- a/web/src/components/SubscribeDialog.js +++ b/web/src/components/SubscribeDialog.js @@ -89,17 +89,6 @@ const SubscribePage = (props) => { console.log(`[SubscribeDialog] Successful login to ${topicUrl(baseUrl, topic)} for user ${username}`); props.onSuccess(); }; - const generateTopicName = () => { - const entropy = randomAlphanumericString(); - let newTopic = props.topic; - if (newTopic) { - newTopic += "-" + entropy; - } else { - const sliceIndex = entropy.length / 2; - newTopic = entropy.slice(0, sliceIndex) + "-" + entropy.slice(sliceIndex); - } - props.setTopic(newTopic); - } const handleUseAnotherChanged = (e) => { props.setBaseUrl(""); setAnotherServerVisible(e.target.checked); @@ -143,7 +132,7 @@ const SubscribePage = (props) => { "aria-label": t("subscribe_dialog_subscribe_topic_placeholder") }} /> -