generated from kichan05/React-Template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
16 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,8 @@ import styled from "styled-components"; | |
import edcanLogo from "./../assets/edcan.svg" | ||
import edcanTypo from "./../assets/edcan_typo.svg" | ||
import {SCoreDream} from "../style/Font"; | ||
import {UI_ACTION_TYPE, useUiDispatch} from "../context/UiReducer"; | ||
import {v4} from "uuid"; | ||
|
||
const BusinessCardStyle = styled.div` | ||
width: 300px; | ||
|
@@ -161,6 +163,8 @@ const BusinessCardStyle = styled.div` | |
` | ||
|
||
export const BusinessCard = ({onMouseMove, onMouseOut, cardState}) => { | ||
const uiDispatch = useUiDispatch() | ||
|
||
const cardStyle = { | ||
transform: `perspective(2000px) rotateX(${cardState.xDeg}deg) rotateY(${cardState.yDeg}deg)` | ||
}; | ||
|
@@ -171,7 +175,16 @@ export const BusinessCard = ({onMouseMove, onMouseOut, cardState}) => { | |
} | ||
|
||
const onEmailCopy = () => { | ||
navigator.clipboard.writeText("[email protected]") | ||
navigator.clipboard.writeText("[email protected]").then(() => { | ||
uiDispatch({ | ||
type: UI_ACTION_TYPE.alert_message_add, | ||
message: { | ||
id: v4(), | ||
title: "메일 주소 복사 완료", | ||
message: "메일 주소를 복사했어요" | ||
} | ||
}) | ||
}) | ||
} | ||
|
||
return ( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters