From 3e182b8d320714ddcee35a6886d542c8cdcc6a95 Mon Sep 17 00:00:00 2001 From: hyejun Date: Sun, 16 Feb 2025 18:29:20 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20user=5Fid=20=EA=B0=92=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/common/LogPage/index.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/common/LogPage/index.tsx b/src/components/common/LogPage/index.tsx index c61d683a..d9b44cb7 100644 --- a/src/components/common/LogPage/index.tsx +++ b/src/components/common/LogPage/index.tsx @@ -7,13 +7,14 @@ import { useUser } from 'utils/hooks/state/useUser'; const userUniqueIdGenerator = (userInfo: UserResponse | null | undefined) => { if (userInfo?.anonymous_nickname) { - localStorage.setItem('uuid', userInfo.anonymous_nickname); - return userInfo.anonymous_nickname; + const modifiedAnonymous = userInfo.anonymous_nickname.replace(/^익명_/, 'anonymous_'); + localStorage.setItem('uuid', modifiedAnonymous); + return modifiedAnonymous; } let uuid = localStorage.getItem('uuid'); - if (!uuid || uuid.includes('익명')) { + if (!uuid || uuid.startsWith('anonymous_')) { uuid = uuidv4(); localStorage.setItem('uuid', uuid); }