Skip to content

Commit 8ac8446

Browse files
committed
feat: 테스트용 버튼 만들기
1 parent df62863 commit 8ac8446

3 files changed

Lines changed: 37 additions & 0 deletions

File tree

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import useGetIsLogin from '@/common/hooks/apis/useGetIsLogin';
2+
3+
import * as s from './style.css';
4+
5+
const TestAPIButton = () => {
6+
const { refetch } = useGetIsLogin();
7+
return (
8+
<button className={s.Button} onClick={() => refetch()}>
9+
API 테스팅하기
10+
</button>
11+
);
12+
};
13+
export default TestAPIButton;
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { css } from '@styled-system/css';
2+
3+
export const Button = css({
4+
padding: '10px 24px',
5+
background: 'linear-gradient(90deg, #6a11cb 0%, #2575fc 100%)',
6+
color: 'white',
7+
border: 'none',
8+
borderRadius: '8px',
9+
fontWeight: 'bold',
10+
fontSize: '16px',
11+
cursor: 'pointer',
12+
boxShadow: '0 2px 8px rgba(106, 17, 203, 0.15)',
13+
transition: 'background 0.2s, transform 0.1s',
14+
_hover: {
15+
background: 'linear-gradient(90deg, #2575fc 0%, #6a11cb 100%)',
16+
transform: 'translateY(-2px) scale(1.03)',
17+
},
18+
_active: {
19+
background: 'linear-gradient(90deg, #6a11cb 0%, #2575fc 100%)',
20+
transform: 'scale(0.98)',
21+
},
22+
});

src/pages/HomePage/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import type { ActivityComponentType } from '@stackflow/react';
55
import * as s from './style.css';
66

77
import AppScreenWithSafeArea from '@/common/components/AppScreenWithSafeArea';
8+
import TestAPIButton from '@/common/components/TestAPIButton';
89

910
const HomePage: ActivityComponentType = () => {
1011
const { push } = useFlow();
@@ -16,6 +17,7 @@ const HomePage: ActivityComponentType = () => {
1617
<a href={`${import.meta.env.VITE_API_URL}/oauth2/authorization/kakao`}>카카오톡 로그인</a>
1718
<a href={`${import.meta.env.VITE_API_URL}/oauth2/authorization/google`}>구글 로그인</a>
1819
<i className={s.Container}>백엔드에몽 로그인 고쳐줘</i>
20+
<TestAPIButton />
1921
<button onClick={() => push('PostPage', {})}>이동</button>
2022
</div>
2123
</AppScreenWithSafeArea>

0 commit comments

Comments
 (0)