Skip to content

Commit

Permalink
[#7] 대표자가 아닌 번호를 표기하지 않도록 설정
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaeha Yi committed May 5, 2022
1 parent 7be7646 commit 90c8c86
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/hooks/useFormattedPhone.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export const useFormattedPhone = (rawPhone) => {
const phone = `${rawPhone.slice(0, 3)}-${rawPhone.slice(3, 7)}-${rawPhone.slice(7)}`;
return phone;
if (rawPhone === "00000000000") return "";
return `${rawPhone.slice(0, 3)}-${rawPhone.slice(3, 7)}-${rawPhone.slice(7)}`;
};

0 comments on commit 90c8c86

Please sign in to comment.