-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[월간조회] 데스크탑뷰 QA이슈 해결 #20
Changes from 15 commits
75e516f
fef942d
a4aacbf
e0c5550
27e845e
d30f1e3
7b09aa9
8160ad9
c66eef7
0ab3e87
803938f
4c17f44
11f874b
7cc0159
78f9e6a
8c0e25f
7827e00
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,3 +36,7 @@ button { | |
ul { | ||
list-style: none; | ||
} | ||
|
||
input::-webkit-inner-spin-button { | ||
appearance: none; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
.container { | ||
position: absolute; | ||
display: flex; | ||
top: 80px; | ||
right: 0; | ||
width: 100%; | ||
background-color: #f5f5f5; | ||
box-shadow: 0 5px 7px rgb(0 0 0 / 10%); | ||
z-index: 10; | ||
flex-direction: column; | ||
} | ||
|
||
.setting-item__link { | ||
text-decoration: none; | ||
color: #333; | ||
padding: 10px; | ||
text-align: left; | ||
width: calc(100% - 20px); | ||
|
||
&:hover { | ||
background-color: #f0f0f0; | ||
} | ||
} | ||
|
||
.setting-item__button { | ||
padding: 10px; | ||
text-align: left; | ||
width: 100%; | ||
background: none; | ||
border: none; | ||
cursor: pointer; | ||
|
||
&:hover { | ||
background-color: #f0f0f0; | ||
} | ||
} | ||
|
||
.setting-item__word { | ||
font-size: 16px; | ||
height: 30px; | ||
color: #1f1f1f; | ||
padding-left: 20px; | ||
} | ||
|
||
.setting-item__warning { | ||
font-size: 16px; | ||
height: 30px; | ||
color: #ec2d30; | ||
padding-left: 20px; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { Link } from 'react-router-dom'; | ||
|
||
import { useLogout } from 'query/auth'; | ||
|
||
import styles from './Dropdown.module.scss'; | ||
|
||
interface MobileDropdownProps { | ||
view: boolean; | ||
} | ||
|
||
function MobileDropdown({ view }: MobileDropdownProps) { | ||
const { logout } = useLogout(); | ||
|
||
const handleLogout = () => { | ||
logout(); | ||
}; | ||
|
||
return ( | ||
<div> | ||
{view && ( | ||
<div className={styles.container}> | ||
<Link className={styles['setting-item__link']} to="https://forms.gle/wqD6PkjZoaaHJ1bo8" target="_blank" rel="noopener noreferrer"> | ||
<div className={styles['setting-item__word']}>BCSD Lab에 문의하기</div> | ||
</Link> | ||
<button type="button" className={styles['setting-item__button']} onClick={handleLogout}> | ||
<div className={styles['setting-item__warning']}>로그아웃</div> | ||
</button> | ||
</div> | ||
)} | ||
</div> | ||
); | ||
} | ||
|
||
export default MobileDropdown; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,47 @@ | ||
import { useState } from 'react'; | ||
Check failure on line 1 in src/layout/Header/index.tsx GitHub Actions / ESLint
Check warning on line 1 in src/layout/Header/index.tsx GitHub Actions / ESLint
|
||
|
||
import { Link } from 'react-router-dom'; | ||
|
||
import Menu from 'assets/svg/auth/menu.svg?react'; | ||
import Logo from 'assets/svg/common/koin-logo.svg?react'; | ||
import Setting1 from 'pages/Coop/components/Setting'; | ||
import useBooleanState from 'hooks/useBooleanState'; | ||
import useMediaQuery from 'hooks/useMediaQuery'; | ||
|
||
import styles from './Header.module.scss'; | ||
import HeaderNavigation from './HeaderNavigation'; | ||
import MobileDropdown from './MobileDropdown'; | ||
|
||
function Header() { | ||
const { isMobile } = useMediaQuery(); | ||
const [view,,,, setView] = useBooleanState(false); | ||
|
||
return ( | ||
<header | ||
className={styles.header} | ||
> | ||
<Logo /> | ||
<header className={styles.header}> | ||
<Logo className={styles.logo__icon} /> | ||
<nav className={styles.header__content}> | ||
<Setting1 /> | ||
{isMobile ? ( | ||
<div> | ||
<ul> | ||
<div className={styles['menu-container']}> | ||
{/* 월간조회 기능 추가 시 활성화 */} | ||
{/* <SearchIcon className={styles.search} /> */} | ||
Comment on lines
+24
to
+25
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 이건 다음 기획에 예정되어있는 기능인가요? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 네 맞습니다! |
||
<button | ||
type="button" | ||
onClick={setView} | ||
className={styles['menu-icon']} | ||
style={{ position: 'relative' }} | ||
aria-label="메뉴 버튼" | ||
> | ||
<Menu className={styles.menu} /> | ||
</button> | ||
<MobileDropdown view={view} /> | ||
</div> | ||
</ul> | ||
<Link to="/setting" /> | ||
</div> | ||
) : ( | ||
<HeaderNavigation /> | ||
)} | ||
</nav> | ||
</header> | ||
); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
얘는 제가 사이트 계정을 몰라서 들어가서 보지는 못했네요ㅠㅠ
만약 모바일에서만 보이는 것이라면
&&
를 써서 표현하는 것도 좋을 것 같아요.아니면 모바일과 웹이 아주 많이 다르다면 아예 컴포넌트를 따로 파서 조건부 렌더링을 해주는 것도 나쁘지 않은 방법이라고 생각합니다~ ( 이건 추후 상세한 개발 시에 고려해주세요~)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
모바일과 데스크탑의 헤더가 다르기 때문에 이렇게 작성하였습니다..!