-
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.
Merge pull request #71 from Ong-gi-Jong-gi/feature/TSK-21/facetime
[TSK-21] 화상채팅 비율 및 이팩트 추가
- Loading branch information
Showing
14 changed files
with
80 additions
and
15 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
4 changes: 3 additions & 1 deletion
4
src/components/face-challenge/facetime/CustomParticipantTile.tsx
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
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
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
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import clsx from 'clsx'; | ||
import { useEffect, useState } from 'react'; | ||
import FACETIME from '../../../constants/FACETIME'; | ||
import { useFacetimeChallengeStore } from '../../../store/facetimeChallengeStore'; | ||
|
||
const SnapshotEffect = () => { | ||
const [isSnapshot, setIsSnapshot] = useState(false); | ||
const { status, remainingTime } = useFacetimeChallengeStore(); | ||
useEffect(() => { | ||
if ( | ||
status === 'ongoing' && | ||
remainingTime !== FACETIME.TIMER_UNIT * FACETIME.PHOTO_COUNT && | ||
remainingTime % FACETIME.TIMER_UNIT === 0 | ||
) { | ||
setIsSnapshot(true); | ||
setTimeout(() => { | ||
setIsSnapshot(false); | ||
}, 1000); | ||
} | ||
}, [status, remainingTime]); | ||
const snapshotClass = clsx( | ||
'absolute left-0 top-0 z-50 h-full w-full bg-white', | ||
{ 'pointer-events-none opacity-0': !isSnapshot }, | ||
{ 'animate-flash opacity-80': isSnapshot }, | ||
); | ||
return <div className={snapshotClass}></div>; | ||
}; | ||
|
||
export default SnapshotEffect; |
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 |
---|---|---|
@@ -1,7 +1,9 @@ | ||
const TIMER_UNIT = 3; | ||
const PHOTO_COUNT = 4; | ||
const LOCAL_STORAGE_KEY = 'mooluck-nickname'; | ||
|
||
Object.freeze(TIMER_UNIT); | ||
Object.freeze(PHOTO_COUNT); | ||
Object.freeze(LOCAL_STORAGE_KEY); | ||
|
||
export default { TIMER_UNIT, PHOTO_COUNT }; | ||
export default { TIMER_UNIT, PHOTO_COUNT, LOCAL_STORAGE_KEY }; |
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
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