Skip to content

Commit

Permalink
라우팅 연결
Browse files Browse the repository at this point in the history
  • Loading branch information
seacrab808 committed Aug 5, 2024
1 parent a024587 commit 3bbce45
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions src/components/layout/Landing.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
/** @jsxImportSource @emotion/react */

import React from "react";
import logo from "../../assets/drawaday_logo.png";
import myInfo from "../../assets/drawaday_my.png";
import { css } from "@emotion/react";
import { useNavigate } from "react-router-dom";

const mainWrap = css`
display: flex;
Expand Down Expand Up @@ -80,18 +79,34 @@ const myInfoWrap = css`
}
`;


const Landing = () => {
const navigate = useNavigate();

const useLogIn = () => {
navigate("/auth/login")
}

const useSignIn = () => {
navigate("/auth/signIn")
}

const useHome = () => {
navigate("/home")
}


return (
<div css={mainWrap}>
<div css={logoWrap}>
<img src={logo} alt="logo" />
</div>
<div css={btnWrap}>
<div css={login}>로그인</div>
<div css={signin}>회원가입</div>
<div onClick={useLogIn} css={login}>로그인</div>
<div css={signin} onClick={useSignIn}>회원가입</div>
<p css={nonOp}>비회원으로 사용하기</p>
</div>
<div css={myInfoWrap}>
<div css={myInfoWrap} onClick={useHome}>
<img src={myInfo} alt="myInfo" />
</div>
</div>
Expand Down

0 comments on commit 3bbce45

Please sign in to comment.