-
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 #13 from junction-asia-2023/feat/home
feat(home): Add Active
- Loading branch information
Showing
13 changed files
with
196 additions
and
36 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
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 { FunctionComponent } from 'react'; | ||
import { useNavigate } from 'react-router-dom'; | ||
|
||
import activeLogo from '/svg/active.svg'; | ||
import rightIcon from '/svg/right.svg'; | ||
|
||
import { URL } from '../../shared/constants/url'; | ||
|
||
const Active: FunctionComponent = () => { | ||
const navigate = useNavigate(); | ||
const handleActiveClick = () => navigate(URL.setting); | ||
|
||
return ( | ||
<section className="active-box" onClick={handleActiveClick}> | ||
<div className="icon-box"> | ||
<img className="icon" src={activeLogo} alt="active icon" /> | ||
</div> | ||
<div className="content"> | ||
<div className="title">Active</div> | ||
<div className="description">Expressing myself</div> | ||
</div> | ||
<div className="next"> | ||
<img className="next-icon" src={rightIcon} alt="next" /> | ||
</div> | ||
</section> | ||
); | ||
}; | ||
|
||
export default Active; |
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 @@ | ||
const GrayBar = () => { | ||
return <div className="gray-bar" />; | ||
}; | ||
|
||
export default GrayBar; |
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,37 @@ | ||
import { useAtom } from 'jotai'; | ||
import { FunctionComponent } from 'react'; | ||
|
||
import { userAtom } from '../../login/atom'; | ||
|
||
const Profile: FunctionComponent = () => { | ||
const [{ email, profileImage, department, name, position }] = | ||
useAtom(userAtom); | ||
|
||
return ( | ||
<section className="profile-box"> | ||
<div className="image-box"> | ||
<img className="image" src={profileImage} alt="profile" /> | ||
</div> | ||
<div className="list-box"> | ||
<div className="list"> | ||
<div className="name">Name</div> | ||
<div className="description">{name}</div> | ||
</div> | ||
<div className="list"> | ||
<div className="name">Department</div> | ||
<div className="description">{department}</div> | ||
</div> | ||
<div className="list"> | ||
<div className="name">Email</div> | ||
<div className="description">{email}</div> | ||
</div> | ||
<div className="list"> | ||
<div className="name">Position</div> | ||
<div className="description">{position}</div> | ||
</div> | ||
</div> | ||
</section> | ||
); | ||
}; | ||
|
||
export default Profile; |
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,75 @@ | ||
@import '../shared/style/color'; | ||
|
||
.profile-box { | ||
display: flex; | ||
flex-direction: column; | ||
|
||
padding: 24px 16px 16px 16px; | ||
gap: 24px; | ||
|
||
.image-box { | ||
display: flex; | ||
justify-content: center; | ||
|
||
.image { | ||
width: 100px; | ||
height: 100px; | ||
} | ||
} | ||
|
||
.list-box { | ||
display: flex; | ||
flex-direction: column; | ||
|
||
gap: 16px; | ||
|
||
.list { | ||
display: flex; | ||
height: 24px; | ||
gap: 16px; | ||
|
||
.name { | ||
width: 100px; | ||
} | ||
.description { | ||
color: $description-sub; | ||
} | ||
} | ||
} | ||
} | ||
.gray-bar { | ||
height: 12px; | ||
background-color: $other-area-color; | ||
} | ||
.active-box { | ||
display: flex; | ||
align-items: center; | ||
justify-content: space-between; | ||
|
||
cursor: pointer; | ||
|
||
height: 72px; | ||
padding: 8px 16px; | ||
gap: 16px; | ||
|
||
.icon-box { | ||
width: 36px; | ||
height: 36px; | ||
} | ||
|
||
.content { | ||
// width: 260px; | ||
width: 100%; | ||
padding: 0px 12px; | ||
|
||
.title { | ||
font-weight: 500; | ||
line-height: 24px; | ||
} | ||
|
||
.description { | ||
color: $description-sub; | ||
font-size: 14px; | ||
} | ||
} | ||
} |
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,14 @@ | ||
import { useAtom } from 'jotai'; | ||
import { useLayoutEffect } from 'react'; | ||
|
||
import { titleAtom } from '../../shared/layout/atom'; | ||
|
||
const useHomeContainer = () => { | ||
const [, setTitle] = useAtom(titleAtom); | ||
|
||
useLayoutEffect(() => { | ||
setTitle({ title: 'CardMe' }); | ||
}, []); | ||
}; | ||
|
||
export default useHomeContainer; |
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,8 +1,11 @@ | ||
import { DummyUser } from './type'; | ||
|
||
export const DUMMY_USER: DummyUser = { | ||
name: 'Sangchul', | ||
profileImage: 'https://avatars.githubusercontent.com/u/23524849?v=4', | ||
email: '[email protected]', | ||
companyNo: 'JS1234', | ||
password: 'just', | ||
department: 'dev1', | ||
department: 'Social Dev1', | ||
position: 'Software Engineer', | ||
}; |
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
export enum URL { | ||
home = '/', | ||
login = '/login', | ||
setting = '/setting', | ||
} |
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