-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45 from primus-teoSprint/develop
2차 �main 머지
- Loading branch information
Showing
8 changed files
with
123 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,37 @@ | ||
# 프리무스 | ||
# 프리무스<img src="https://github.com/primus-teoSprint/FE/assets/63100352/92d0b17a-e08d-4b9e-bd7d-a502def93e07" align=left width=100> | ||
|
||
아이디어 검증 툴 서비스 | ||
> 💡 아이디어 검증 툴 서비스 | ||
<div align="center"> | ||
<h3> | ||
|
||
[`https://primus.today`](https://primus-chi.vercel.app) | ||
|
||
</h3> | ||
</div> | ||
|
||
## 🪐 Main Service | ||
|
||
#### `아이디어 툴` | ||
|
||
(자료 추가 예정) | ||
|
||
#### `아이디어 검증` | ||
|
||
#### `적극적 투자 지표` | ||
|
||
#### `결과 도출` | ||
|
||
<br /> | ||
|
||
## 🌝 Project | ||
|
||
#### `팀원` | ||
|
||
> 테오의 스프린트 17기 | ||
| [FE 스리](https://github.com/hanseulhee) | [BE 최롱](https://github.com/Choirong) | [FE 피기](https://github.com/03hoho03) | [FE 환두](https://github.com/chaduhwan) | | ||
| :---------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------: | | ||
| <img src="https://avatars.githubusercontent.com/u/63100352?v=4" width="150" height="160"> | <img src="https://avatars.githubusercontent.com/u/89922415?v=4" width="150" height="160"> | <img src="https://avatars.githubusercontent.com/u/122659293?v=4" width="150" height="160"> | <img src="https://avatars.githubusercontent.com/u/137901354?v=4" width="150" height="160"> | | ||
|
||
#### `기술 스택` |
40 changes: 40 additions & 0 deletions
40
app/(route)/indicators/_components/button/KakaoShareButton.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
'use client' | ||
|
||
import { resultAtom, selectedItemAtom } from '@/app/_store/atom' | ||
import { useEffect } from 'react' | ||
import { useRecoilValue } from 'recoil' | ||
|
||
const id = 'kakao-sdk' | ||
|
||
function KakaoShareButton() { | ||
const selectedItem = useRecoilValue(selectedItemAtom) | ||
const resultItem = useRecoilValue(resultAtom) | ||
|
||
useEffect(() => { | ||
if (document.getElementById(id) == null) { | ||
const script = document.createElement('script') | ||
script.id = id | ||
script.src = 'https://developers.kakao.com/sdk/js/kakao.js' | ||
script.onload = () => { | ||
window.Kakao.init(process.env.NEXT_PUBLIC_KAKAO_SHARE_KEY) | ||
window.Kakao.isInitialized() | ||
} | ||
document.body.appendChild(script) | ||
} | ||
}, []) | ||
|
||
const kakaoShare = () => { | ||
window.Kakao.Share.sendCustom({ | ||
installTalk: true, | ||
templateId: 106777, | ||
templateArgs: { | ||
name: `${selectedItem?.name}`, | ||
result: `${resultItem}`, | ||
}, | ||
}) | ||
} | ||
|
||
return <button onClick={kakaoShare}>카카오톡 공유</button> | ||
} | ||
|
||
export default KakaoShareButton |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
declare module '*.css' | ||
|
||
declare module '*.sass' | ||
|
||
interface Window { | ||
Kakao: any | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters