Skip to content

Commit

Permalink
feat :: 기능 일부 완성
Browse files Browse the repository at this point in the history
  • Loading branch information
six-standard committed Jan 2, 2024
1 parent 74cd39a commit 6e16c57
Show file tree
Hide file tree
Showing 9 changed files with 436 additions and 354 deletions.
30 changes: 21 additions & 9 deletions src/Components/Nav.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,31 @@ import { theme } from "../styles/theme";
export const Nav = () => {
return (
<Wrapper>
<img src='/imgs/Logo.svg' title='Aster' alt='' />
<img src="/imgs/Logo.svg" title="Aster" alt="" />
<Interactions>
<Button to='/'>
<Icon icon="iconoir:home-alt-slim" color={theme.color.darkGray} width="25px"/>
<Button to="/">
<Icon
icon="iconoir:home-alt-slim"
color={theme.color.darkGray}
width="25px"
/>
</Button>
<Button to='/ranking'>
<Icon icon="iconoir:trophy" color={theme.color.darkGray} width="25px" />
<Button to="/ranking">
<Icon
icon="iconoir:trophy"
color={theme.color.darkGray}
width="25px"
/>
</Button>
<Button to='/message'>
<Icon icon="iconoir:message-text" color={theme.color.darkGray} width="25px" />
<Button to="/board">
<Icon
icon="iconoir:message-text"
color={theme.color.darkGray}
width="25px"
/>
</Button>
<Button to='/profile' style={{ padding: 0 }}>
<img src='/imgs/icons/DefaultProfile.svg' alt='' />
<Button to="/profile" style={{ padding: 0 }}>
<img src="/imgs/icons/DefaultProfile.svg" alt="" />
</Button>
</Interactions>
</Wrapper>
Expand Down
8 changes: 5 additions & 3 deletions src/apis/Profile/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { instance } from "../axios"
import { instance } from "../axios";

export const getMyPage = async (token) => {
return await instance.get("/my-info/user", { headers: { "Authorization": token } })
}
return await instance.get("/user/my-info", {
headers: { Authorization: token },
});
};
22 changes: 20 additions & 2 deletions src/asset/imgs/Profile.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 19 additions & 6 deletions src/asset/imgs/profilePicture.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 26 additions & 13 deletions src/pages/HomePage.jsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,25 @@
import React, { useState } from "react";
import React, { useEffect, useState } from "react";
import { styled } from "styled-components";
import leftPhone from "../asset/imgs/leftPhone.svg";
import rightPhone from "../asset/imgs/rightPhone.svg";
import FadeInBox from "../Components/HomePage/FadeInBox";
import { Speech } from "../Components/HomePage/Speech";
import { useNavigate } from "react-router-dom";
import { Cookies } from "react-cookie";

const HomePage = () => {
const link = useNavigate();

const cookie = new Cookies();
const navigate = new useNavigate();

useEffect(() => {
const token = cookie.get("accessToken");
if (!token) {
navigate("/signup");
}
});

const [inputState, setInputState] = useState({
name: "",
name1: "",
Expand Down Expand Up @@ -45,15 +56,16 @@ const HomePage = () => {
<QuestionMark>?</QuestionMark>
</Main>
<TopInput
placeholder='ex ) 홍길동'
placeholder="ex ) 홍길동"
onChange={onChange}
name='name'
name="name"
value={name}
/>
<Button
onClick={() => {
onMatch(name);
}}>
}}
>
궁합 맞춰보기
</Button>
</TextContainer>
Expand All @@ -80,15 +92,15 @@ const HomePage = () => {
<FadeInBox>
<BottomInputContainer>
<BottomInput
placeholder='ex ) 왕자님'
placeholder="ex ) 왕자님"
onChange={onChange}
name='name1'
name="name1"
value={name1}
/>
<BottomInput
placeholder='ex ) 공주님'
placeholder="ex ) 공주님"
onChange={onChange}
name='name2'
name="name2"
value={name2}
/>
</BottomInputContainer>
Expand All @@ -97,24 +109,25 @@ const HomePage = () => {
<Button
onClick={() => {
onBothMatch(name1, name2);
}}>
}}
>
친구들의 궁합은?
</Button>
</FadeInBox>
</BottomLeft>
<BottomRight>
<SpeechBox>
<FadeInBox>
<Speech messege='변정현의 강요 - 태규' />
<Speech messege="변정현의 강요 - 태규" />
</FadeInBox>
<FadeInBox>
<Speech messege='하는 이유 없음 - 태양' />
<Speech messege="하는 이유 없음 - 태양" />
</FadeInBox>
<FadeInBox>
<Speech messege='깡깡깡 - 의엘' />
<Speech messege="깡깡깡 - 의엘" />
</FadeInBox>
<FadeInBox>
<Speech messege='더나은 dms를 위해 - 의진' />
<Speech messege="더나은 dms를 위해 - 의진" />
</FadeInBox>
</SpeechBox>
</BottomRight>
Expand Down
Loading

0 comments on commit 6e16c57

Please sign in to comment.