Skip to content

Commit fd7fa65

Browse files
committed
feat: phone call with native bridge (#develop)
1 parent 310e36b commit fd7fa65

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

services/ahhachul.com/src/components/domain/lostFound/postDetail/lost112InfoTable/Lost112InfoTable.component.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ interface Props {
1212
const Lost112InfoTable = ({ post }: Props) => {
1313
const { bridge, isBridgeInitialized } = useNativeBridge();
1414

15+
const handleClickExternalPhone = () => {
16+
if (!isBridgeInitialized) return;
17+
18+
bridge.send.callPhone(post.storageNumber);
19+
};
20+
1521
const handleClickExternalLink = () => {
1622
if (!isBridgeInitialized) return;
1723

@@ -44,7 +50,7 @@ const Lost112InfoTable = ({ post }: Props) => {
4450
{post?.storageNumber && (
4551
<>
4652
<S.Label>보관 장소 전화번호</S.Label>
47-
<S.Value>{post.storageNumber}</S.Value>
53+
<S.StyledLink onClick={handleClickExternalPhone}>{post.storageNumber}</S.StyledLink>
4854
</>
4955
)}
5056

0 commit comments

Comments
 (0)