Skip to content

Commit

Permalink
Merge pull request #293 from SejongPeer/JunYoung
Browse files Browse the repository at this point in the history
design:메인페이지 이미지 경로 수정
  • Loading branch information
JunYoungKr authored May 27, 2024
2 parents 25b6996 + 0161d21 commit e2e4fd5
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 3 deletions.
30 changes: 28 additions & 2 deletions src/Pages/Festival/AnimalApply/AnimalApply.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { useEffect } from 'react';
import { useNavigate } from 'react-router-dom';

import kakao from '../../../Assets/image/kakao.png';
import style from '../AnimalApply/AnimalApply.module.css';

Expand All @@ -12,6 +14,30 @@ const AnimalApply = () => {
const goAnimalMatchingResult = () => {
navigate('/fest/AnimalMatchInfo');
};

const goBanner = () => {
window.open('https://animalmeeting.simple.ink/', '_blank');
};

useEffect(() => {
if (window.Kakao) {
const script = document.createElement('script');
script.src = 'https://developers.kakao.com/sdk/js/kakao.min.js';
script.onload = () => {
const key = process.env.REACT_APP_KAKAO_KEY;
window.Kakao.init(key);
};
document.head.appendChild(script);
}
}, []);

const kakaoChat = () => {
if (window.Kakao) {
window.Kakao.Channel.chat({
channelPublicId: '_AgxobG', // 여기에 채널의 고유 ID를 입력하세요.
});
}
};
return (
<div className={style.container1}>
<h1>동물상형 미팅</h1>
Expand All @@ -24,8 +50,8 @@ const AnimalApply = () => {
</button>
</div>
<div className={style.container3}>
<button className={style.festUse}></button>
<button className={style.kakao}>
<button className={style.festUse} onClick={goBanner}></button>
<button className={style.kakao} onClick={kakaoChat}>
<img src={kakao} alt="카카오톡 문의하기" />
카카오톡 문의하기
</button>
Expand Down
2 changes: 1 addition & 1 deletion src/Pages/main/MainPage/MainPage.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@
.festButton {
width: 351px;
height: 204px;
background-image: url(http://localhost:3000/static/media/Festival.bee2265c0dee8bfe93f1.png);
background-image: url(../../../Assets/image/Festival.png);
background-repeat: no-repeat;
background-position: center;
background-size: cover;
Expand Down

0 comments on commit e2e4fd5

Please sign in to comment.