-
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 #15 from StopSoo/forked
메인 화면 버튼 연결 및 로그인 페이지에 back button 추가 ! etc.
- Loading branch information
Showing
8 changed files
with
99 additions
and
19 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,64 @@ | ||
import React, { useState } from 'react'; | ||
import styled from 'styled-components'; | ||
import { GoChevronLeft } from "react-icons/go"; | ||
import { useNavigate } from 'react-router-dom'; | ||
|
||
// 전 페이지로 돌아갈 수 있는 버튼이 있는 상단 바 | ||
function BackBar() { | ||
return ( | ||
<Menus> | ||
<LeftBackBar/> | ||
</Menus> | ||
); | ||
} | ||
|
||
const Menus = styled.div` | ||
width: auto; | ||
height: 8vh; | ||
background: none; | ||
border: none; | ||
display: flex; | ||
flex-direction: row; | ||
margin-right: auto; | ||
margin-top: 1vh; | ||
`; | ||
|
||
function LeftBackBar({}) { | ||
const [isBackHovered, setIsMenuHovered] = useState(false); // 버튼 hover 여부 | ||
const navigate = useNavigate(); | ||
|
||
const isBackClick = () => { | ||
navigate(-1); // 바로 이전 페이지로 가기 | ||
}; | ||
|
||
return ( | ||
<BackButton | ||
onMouseOver={() => setIsMenuHovered(true)} | ||
onMouseOut={() => setIsMenuHovered(false)} | ||
onClick={isBackClick} | ||
> | ||
<GoChevronLeft | ||
size='40px' | ||
color={ isBackHovered ? 'white' : 'black' } | ||
/> | ||
</BackButton> | ||
); | ||
} | ||
|
||
const BackButton = styled.button` | ||
width: 5vw; | ||
height: 8vh; | ||
background: none; | ||
border: none; | ||
position: relative; | ||
justify-content: flex-start; | ||
cursor: pointer; | ||
z-index: 3000; | ||
&:active, | ||
&:hover { | ||
transition: 0.7s; | ||
} | ||
`; | ||
|
||
export default BackBar; |
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