Skip to content

Commit

Permalink
Merge: Fix -> Develop
Browse files Browse the repository at this point in the history
홈페이지 로고 추가, login 페이지 수정, characterPage 수정
  • Loading branch information
chominju02 authored Nov 15, 2024
2 parents d6269ff + 52bea42 commit 4fc1d5f
Show file tree
Hide file tree
Showing 11 changed files with 65 additions and 23 deletions.
2 changes: 1 addition & 1 deletion src/apis/auth/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export const kakaoLoginCallback_kkia = async (code: string): Promise<{ accessTok
const response = await axiosInstance.get<{ accessToken: string; refreshToken: string }>(
"/api/auth/oauth/kakao/callback",
{
baseURL: "https://dandani.site", // 이 요청에서만 baseURL 설정
baseURL: "https://kkia.backapi.site", // 이 요청에서만 baseURL 설정
params: { code },
},
);
Expand Down
Binary file added src/assets/logo/mainLogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/components/PointButton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ export const PointButton = (props: PointButtonProps) => {

const pointList = {
water: 10,
sun: 15,
nutrients: 20,
sun: 20,
nutrients: 40,
};

const actionList = {
Expand Down
10 changes: 6 additions & 4 deletions src/pages/CharacterPage/index.style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import styled from "@emotion/styled";
import logoImg from "@/assets/logo/logo.png";

export const Container = styled.div`
max-width: 440px;
max-width: 400px;
height: 100vh;
margin: 0 auto;
Expand Down Expand Up @@ -61,16 +61,18 @@ export const CharacterItem = styled.div`
justify-content: center;
align-items: center;
gap: 20px;
& > *:first-child {
position: absolute;
top: -30px; /* 상단 텍스트 위치 고정 */
}
& > *:last-child {
position: absolute;
bottom: -30px; /* 하단 텍스트 위치 고정 */
}
padding: 20px;
`;

export const BarContainer = styled.div`
Expand All @@ -96,4 +98,4 @@ export const ButtonContainer = styled.div`
display: flex;
align-items: center;
justify-content: space-between;
`;
`;
6 changes: 3 additions & 3 deletions src/pages/CharacterPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,17 @@ export const CharacterPage = () => {
<Styles.CharacterItem>
{level === 1 && (
<Text size="l" color="black" weight="bold">
1단계 입니다
앞으로 쑥쑥 자랄게요!
</Text>
)}
{level === 2 && (
<Text size="l" color="black" weight="bold">
2단계 입니다
점점 더 멋있어지고 있어요! 。♥‿♥。
</Text>
)}
{level === 3 && (
<Text size="l" color="black" weight="bold">
3단계 입니다
멋지게 자랐어요! •ᴗ•
</Text>
)}
<Temp width="300px" height="270px" level={level} />
Expand Down
12 changes: 9 additions & 3 deletions src/pages/HomePage/index.style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ interface ContainerProps {

// 애니메이션 스타일이 적용된 컨테이너
export const Container = styled.div<ContainerProps>`
max-width: 400px;
height: 100vh;
max-height: 956px;
max-width: 440px;
height: min(100vh, 956px);
margin: 0 auto;
background-color: var(--color-primary);
Expand All @@ -35,3 +34,10 @@ export const Container = styled.div<ContainerProps>`
animation: ${fadeOut} 1s ease forwards;
`}
`;

export const LogoItem = styled.img`
width: 230px;
height: 205px;
border-radius: 15px;
`;
7 changes: 5 additions & 2 deletions src/pages/HomePage/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
// HomePage.tsx
import React, { useEffect, useState } from "react";
import { useNavigate } from "react-router-dom";

import mainLogoImg from "@/assets/logo/mainLogo.png";

import * as Styles from "./index.style";

export const HomePage: React.FC = () => {
Expand All @@ -25,7 +28,7 @@ export const HomePage: React.FC = () => {

return (
<Styles.Container fade={fade}>
<img src="" alt="LOGO" />
<Styles.LogoItem src={mainLogoImg} alt="LOGO" />
</Styles.Container>
);
};
};
5 changes: 5 additions & 0 deletions src/pages/LoginPage/index.style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,8 @@ export const TextContainer = styled.div`
gap: 20px;
`;

export const TextElement = styled.div`
display: flex;
align-items: center;
`;
17 changes: 11 additions & 6 deletions src/pages/LoginPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,21 @@ import * as Styles from "./index.style";

export const LoginPage = () => {
const handleKakaoLogin = () => {
window.location.href = 'http://kkia.backapi.site:8080/api/auth/oauth/kakao';
};
window.location.href = "http://kkia.backapi.site:8080/api/auth/oauth/kakao";
};
return (
<Styles.Container>
<Styles.TextContainer>
<Text size="xl" color="black" weight="bold">
___에 오신 것을 환영합니다
</Text>
<Styles.TextElement>
<Text size="l" color="primary" weight="bold">
"Dan Dan"
</Text>
<Text size="l" color="black" weight="bold">
에 오신 것을 환영합니다
</Text>
</Styles.TextElement>
<Text size="s" color="gray" weight="normal">
로그인 후 ___ 서비스를 경험해보세요
로그인 후 DanDan 서비스를 경험해보세요
</Text>
</Styles.TextContainer>
<Temp width="250px" height="220px" />
Expand Down
12 changes: 12 additions & 0 deletions src/pages/RedirectPage/index.style.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import styled from "@emotion/styled";

export const Container = styled.div`
max-width: 400px;
height: min(100vh, 956px);
margin: 0 auto;
display: flex;
align-items: center;
justify-content: center;
`;

13 changes: 11 additions & 2 deletions src/pages/RedirectPage/index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { useEffect } from "react";
import { useNavigate } from "react-router-dom";

import { Text } from "@/components/Text/index.tsx";

import { kakaoLoginCallback_kkia } from "../../apis/auth/auth.ts";
import { useAuthStore } from "../../store.ts";
import * as Styles from "./index.style.ts";

export const RedirectPage = () => {
const navigate = useNavigate();
Expand Down Expand Up @@ -30,5 +33,11 @@ export const RedirectPage = () => {
fetchData();
}, [navigate, setTokens]);

return <div>카카오 로그인 중입니다…</div>;
};
return (
<Styles.Container>
<Text size="l" weight="bold" color="black">
카카오 로그인 중입니다...
</Text>
</Styles.Container>
);
};

0 comments on commit 4fc1d5f

Please sign in to comment.