-
Notifications
You must be signed in to change notification settings - Fork 2
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 #587 from sparcs-kaist/dev
Main branch update from Dev branch
- Loading branch information
Showing
7 changed files
with
102 additions
and
16 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import { useState } from "react"; | ||
|
||
import hoverEventSet from "tools/hoverEventSet"; | ||
import theme from "tools/theme"; | ||
|
||
import SyncAltRoundedIcon from "@mui/icons-material/SyncAltRounded"; | ||
|
||
type FlipButtonProps = { | ||
onClick: () => void; | ||
disabled: boolean; | ||
}; | ||
|
||
const FlipButton = (props: FlipButtonProps) => { | ||
const [isHover, setHover] = useState(false); | ||
const [isClicked, setClicked] = useState(false); | ||
|
||
return ( | ||
<div | ||
css={{ | ||
position: "absolute", | ||
width: "30px", | ||
height: "30px", | ||
top: "calc(50% - 15px)", | ||
right: "calc(50% - 15px)", | ||
borderRadius: "50%", | ||
display: "flex", | ||
justifyContent: "center", | ||
alignItems: "center", | ||
...theme.cursor(props.disabled), | ||
backgroundColor: props.disabled | ||
? theme.purple_disabled | ||
: isHover | ||
? theme.purple_dark | ||
: theme.purple, | ||
color: theme.white, | ||
boxShadow: | ||
isClicked && !props.disabled ? theme.shadow_clicked : theme.shadow, | ||
}} | ||
onClick={props.disabled ? undefined : props.onClick} | ||
{...hoverEventSet(setHover, setClicked)} | ||
> | ||
<SyncAltRoundedIcon | ||
style={{ | ||
color: theme.white, | ||
fontSize: "20px", | ||
}} | ||
/> | ||
</div> | ||
); | ||
}; | ||
|
||
export default FlipButton; |
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,5 @@ | ||
import { Redirect } from "react-router-dom"; | ||
|
||
const RedirectToHome = () => <Redirect to="/home" />; | ||
|
||
export default RedirectToHome; |
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,19 @@ | ||
import { useEffect } from "react"; | ||
import { useParams } from "react-router-dom"; | ||
|
||
import Loading from "components/Loading"; | ||
|
||
import { getDynamicLink } from "tools/trans"; | ||
|
||
const Invite = () => { | ||
const { roomId } = useParams<{ roomId: string }>(); | ||
|
||
useEffect(() => { | ||
// dynamic link로 웹에서 앱으로 이동가능할 시 이동합니다. | ||
window.location.href = getDynamicLink(`/home/${roomId}`); | ||
}, []); | ||
|
||
return <Loading center />; | ||
}; | ||
|
||
export default Invite; |
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