Skip to content

Commit

Permalink
feat: [#57] 로그인 버튼 클릭 시 화면 전환되는 로직 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
SeyeonJang committed Aug 18, 2024
1 parent 4645b92 commit 3cfad29
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions FITple-Frontend/src/pages/MainPage/MainPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,22 @@ import React from 'react';
import { Container, Header, LogoContainer, Logo, MainText, Button, ImageWrapper } from './MainPage.style';
import fitpleLogo from '../../../assets/Logo.svg';
import mainPageImage from '../../../assets/mainpage.svg';
import { useNavigate } from "react-router-dom";

function MainPage() {
const navigate = useNavigate();
const handleLoginClick = () => {
navigate('/login');
};

const MainPage = () => {
return (
<Container>
<Header>
<LogoContainer>
<Logo src={fitpleLogo} alt="Fitple Logo" />
<MainText>FITple</MainText>
</LogoContainer>
<Button>로그인 / 회원가입</Button>
<Button onClick={handleLoginClick}>로그인 / 회원가입</Button>
</Header>
<ImageWrapper>
<img src={mainPageImage} alt="Main Page" />
Expand Down

0 comments on commit 3cfad29

Please sign in to comment.