Skip to content

Commit

Permalink
Merge pull request #22 from Team-C0nnect/feature/#20
Browse files Browse the repository at this point in the history
Feature/#20
  • Loading branch information
kyumin7487 authored Sep 9, 2024
2 parents eab9584 + 7f7c46e commit 3733716
Show file tree
Hide file tree
Showing 7 changed files with 77 additions and 31 deletions.
15 changes: 8 additions & 7 deletions src/components/common/header/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@ const Header = () => {

return (
<S.headWrap>
<S.logoImg src={logoImg} alt="logo" />

<S.navBar>네비게이션 바</S.navBar>

{getTokenCheck() ? (
<>
<S.logoImg src={logoImg} alt="logo" />
<S.nameContainer>
<S.profileImg src={profileImg} alt="profileImg" />
<S.profileName className="name">{data?.name}</S.profileName>
</S.nameContainer>
</>
<S.nameContainer>
<S.profileImg src={profileImg} alt="profileImg" />
<S.profileName>{data?.data.name}</S.profileName>
</S.nameContainer>
) : null}
</S.headWrap>
);
Expand Down
46 changes: 33 additions & 13 deletions src/components/common/header/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,53 @@ import styled from "styled-components";
export const headWrap = styled.div`
width: 100%;
display: flex;
position: absolute;
align-items: center;
justify-content: flex-end;
justify-content: space-between;
padding: 0 20px;
background-color: #0389FF;
position: relative;
height: 80px;
`;

export const logoImg = styled.img`
width: 32px;
height: 32px;
width: 90px;
height: 90px;
flex-shrink: 0;
`;

export const navBar = styled.nav`
flex: 1;
display: flex;
justify-content: center;
align-items: center;
color: white;
font-size: 18px;
font-weight: bold;
`;

export const nameContainer = styled.div`
width: 100px;
height: 100px;
display: flex;
align-items: center;
background-color: #FFFFFF;
border-radius: 50%;
border-radius: 50px;
padding: 10px 20px;
gap: 10px;
margin-right: 25px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
width: 150px;
height: 25px;
;
`;

export const profileImg = styled.img`
width: 20px;
height: 20px;
width: 30px;
height: 30px;
border-radius: 50%;
`;

export const profileName = styled.span`
font-size: 16px;
font-style: normal;
font-size: 18px;
font-weight: 700;
padding-left: 11px;
`;
color: #000000;
margin-left: 20px;
`;
11 changes: 11 additions & 0 deletions src/components/home/Main/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from "react";

const Main = () => {
return (
<div>

</div>
)
}

export default Main;
1 change: 1 addition & 0 deletions src/components/home/Main/style.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import styled from "styled-components";
2 changes: 2 additions & 0 deletions src/components/routers/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ import React from "react";
import { Route, Routes } from "react-router-dom";
import Sign from "src/pages/auth/page";
import Notfound from "src/components/common/notfound";
import MainPage from "src/pages/Main/page";

const Routers = () => {
return (
<Routes>
<Route path="/sign" element={<Sign />} />
<Route path="*" element={<Notfound />} />
<Route path="/main" element={<MainPage />} />
</Routes>
)
}
Expand Down
10 changes: 10 additions & 0 deletions src/pages/Main/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import React from "react";
import MainComponents from "src/components/home/Main/index";

const Page = () => {
return (
<MainComponents />
)
}

export default Page;
23 changes: 12 additions & 11 deletions src/types/profile/profile.type.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
export interface profileType {
email : string,
name : string,
password : string,
stdId : string,
room : string,
phoneNum : string,
gender : string,
userRole : string,
isChecked : false,
checkedDate : string

data: {
email : string,
name : string,
password : string,
stdId : string,
room : string,
phoneNum : string,
gender : string,
userRole : string,
isChecked : false,
checkedDate : string
}
}

0 comments on commit 3733716

Please sign in to comment.