Skip to content

Commit

Permalink
Dev (#125)
Browse files Browse the repository at this point in the history
* fix: ui ๋ฒ„๊ทธ ์ˆ˜์ •

* prompt ์ˆ˜์ •, console ์ œ๊ฑฐ (#123)

* release ์ถ”๊ฐ€ (#124)

---------

Co-authored-by: ์ด์žฌํ˜‘ <zzok3312@naver.com>
  • Loading branch information
yonghyun421 and JaeHyup0504 authored May 17, 2024
1 parent 01ca17c commit 1a5d157
Show file tree
Hide file tree
Showing 18 changed files with 129 additions and 65 deletions.
21 changes: 21 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Release Drafter

# Components of the release notes
categories:
- title: '๐Ÿš€ Features'
labels:
- 'feature'
- title: '๐Ÿ› Bug Fixes'
labels:
- 'bug'
- title: '๐Ÿงน Chores'
labels:
- 'chore'
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
version-template: 'v$NEXT_PATCH_VERSION'
template: |
## What's Changed
$CHANGES
**Full Changelog**: https://github.com/$REPO/compare/$PREVIOUS_TAG...$NEW_TAG
22 changes: 22 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Release Drafter

on:
push:
branches:
- main
pull_request:
types: [closed]
release:
types: [published]

jobs:
update_release_draft:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Update Release Drafter
uses: release-drafter/release-drafter@v5
with:
config-name: release-drafter.yml
11 changes: 11 additions & 0 deletions .pnp.cjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
"axios": "^1.6.8",
"bootstrap": "^5.3.3",
"clsx": "^2.1.1",
"dayjs": "^1.11.11",
"firebase": "^10.11.1",
"openai": "^4.40.2",
"openai-edge": "^1.2.2",
Expand Down
52 changes: 29 additions & 23 deletions src/api/gpt.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,17 @@ interface RepoData {
}

export const CallGPT = async (repoData: RepoData) => {
const { data, member, avatar_url, techStackList, packageManagerList, descriptionList, aboutRepo, githubRepo, openAiKey } = repoData;
const {
data,
member,
avatar_url,
techStackList,
packageManagerList,
descriptionList,
aboutRepo,
githubRepo,
openAiKey,
} = repoData;

const prompt = `
๋ ˆํฌ์ง€ํ† ๋ฆฌ์˜ ์ด๋ฆ„: ${data.name}
Expand All @@ -41,46 +51,47 @@ export const CallGPT = async (repoData: RepoData) => {
ํ”„๋กœ์ ํŠธ์— ๋Œ€ํ•œ ์„ค๋ช…: ${descriptionList}
${aboutRepo.map(item => `${item.title}: ${item.value}`).join("\n")}
์œ„์˜ ๊ฐ’๋“ค์€ github API๋ฅผ ์ด์šฉํ•ด์„œ ๋ ˆํฌ์ง€ํ† ๋ฆฌ์˜ ์ •๋ณด๋ฅผ ๊ฐ€์ ธ์˜จ ๊ฒƒ์ด๊ณ , ์•„๋ž˜๋Š” README ํŒŒ์ผ์„ ์ƒ์„ฑํ•˜๋Š”๋ฐ ์‚ฌ์šฉ๋  ์˜ˆ์‹œ ํ…œํ”Œ๋ฆฟ์ž…๋‹ˆ๋‹ค. ์œ„์˜ ์ •๋ณด๋“ค์„ ์‚ฌ์šฉํ•ด ์•„๋ž˜ ๊ฐ๊ฐ์˜ ์„น์…˜๋“ค์— ํ•ด๋‹นํ•˜๋Š” ๋‚ด์šฉ์„ ์ถ”๊ฐ€ํ•ด์„œ README๋ฅผ ์ž‘์„ฑํ•ด์ฃผ์„ธ์š”.
์œ„์˜ ๋ฐ์ดํ„ฐ๋“ค์€ README ํŒŒ์ผ์„ ์ž‘์„ฑํ•˜๋ ค๋Š” ํ”„๋กœ์ ํŠธ์— ๋Œ€ํ•œ ์ •๋ณด์ด๊ณ , ์•„๋ž˜๋Š” README ํŒŒ์ผ์„ ์ƒ์„ฑํ•˜๋Š”๋ฐ ์‚ฌ์šฉ๋  ์˜ˆ์‹œ ํ…œํ”Œ๋ฆฟ์ž…๋‹ˆ๋‹ค.
์œ„์˜ ๋ฐ์ดํ„ฐ๋ฅผ ์‚ฌ์šฉํ•ด ์•„๋ž˜ ๊ฐ๊ฐ์˜ ์„น์…˜๋“ค์— ํ•ด๋‹นํ•˜๋Š” ๋‚ด์šฉ์„ ์˜ˆ์‹œ์™€ ๊ฐ™์€ ํ˜•ํƒœ๋กœ ํ”„๋กœ์ ํŠธ์— ๋งž๊ฒŒ README๋ฅผ ์ž‘์„ฑํ•ด์ฃผ์„ธ์š”.
์ถ”๊ฐ€์ ์œผ๋กœ ์ƒ๋žต๋˜๋Š” ์„น์…˜์ด ์—†๋„๋ก ํ•ด์ฃผ์„ธ์š”.
"" ์•ˆ์— ๋“ค์–ด์žˆ๋Š” ๋‚ด์šฉ๋“ค์„ ๊ฐ๊ฐ์˜ ์„น์…˜์— ๋“ค์–ด๊ฐ€์•ผ ํ•  ๋‚ด์šฉ์„ ์„ค๋ช…ํ•ด ๋†“์€ ๊ฒƒ์ž…๋‹ˆ๋‹ค.
''์•ˆ์— ๋“ค์–ด์žˆ๋Š” ๋‚ด์šฉ์€ ์˜ˆ์‹œ์ž…๋‹ˆ๋‹ค. ๋งŒ์•ฝ ํ•ด๋‹น ์„น์…˜์— ์ถ”๊ฐ€ํ•  ๋‚ด์šฉ์„ ๊ฐ€์ ธ์˜ฌ ์ˆ˜ ์—†๋Š” ๊ฒฝ์šฐ์—๋Š” ์˜ˆ์‹œ์™€ ๋˜‘๊ฐ™์ด ์ž‘์„ฑํ•˜์ง€ ๋ง๊ณ  "์ง์ ‘ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”" ๋ผ๋Š” ๋ฌธ๊ตฌ๋ฅผ ๋„ฃ์–ด์ฃผ์„ธ์š”.
''์•ˆ์— ๋“ค์–ด์žˆ๋Š” ๋‚ด์šฉ์€ ์–ด๋–ป๊ฒŒ ์ž‘์„ฑ๋˜์–ด์•ผ ํ•˜๋Š”์ง€์— ๋Œ€ํ•œ ์˜ˆ์‹œ ๋‚ด์šฉ์ž…๋‹ˆ๋‹ค.
๋งŒ์•ฝ ํ•ด๋‹น ์„น์…˜์— ์ถ”๊ฐ€ํ•  ๋‚ด์šฉ์„ ์ฐพ์„ ์ˆ˜ ์—†๋Š” ๊ฒฝ์šฐ์—๋Š” ์˜ˆ์‹œ์˜ ๋‚ด์šฉ๊ณผ ์ƒ๊ด€์—†์ด "๋‚ด์šฉ์„ ์ง์ ‘ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”" ๋ผ๋Š” ๋ฌธ๊ตฌ๋ฅผ ๋„ฃ์–ด์ฃผ์„ธ์š”.
์—ฌ๊ธฐ๋ถ€ํ„ฐ ์•„๋ž˜๋กœ๋Š” README ํŒŒ์ผ์„ ์ž‘์„ฑํ•˜๋Š”๋ฐ ์‚ฌ์šฉ๋  ์˜ˆ์‹œ ํ…œํ”Œ๋ฆฟ์ž…๋‹ˆ๋‹ค.
"์•„๋ž˜ ์ด๋ฏธ์ง€๋Š” ๋ฌด์กฐ๊ฑด ์ถ”๊ฐ€ํ•ด์ค˜"
"์•„๋ž˜ ์ด๋ฏธ์ง€๋Š” ๋ฆฌ๋“œ๋ฏธ ํŒŒ์ผ ๋งจ์œ„์— ํ•ญ์ƒ ์ถ”๊ฐ€ํ•ด์ค˜"
![ํ”„๋กœ์ ํŠธ-๋กœ๊ณ ๋‚˜ ๋ฉ”์ธํ™”๋ฉด-์ž…๋ ฅํ•ด์ฃผ์„ธ์š”](https://github.com/Readme-Monster/readme-monster/assets/88364280/96e680e5-613f-4818-8603-8afbb0c9acb1)
"์ตœ๊ทผ ์ปค๋ฐ‹์ด๋‚˜ ์—…๋ฐ์ดํŠธ์— ํ•ด๋‹นํ•˜๋Š” ๊ฐ’์„ ์•„๋ž˜์™€ ๊ฐ™์€ ํ˜•์‹์œผ๋กœ ๊ฐ€์ ธ์™€์„œ ๋„ฃ์–ด์ฃผ์„ธ์š”."
"์ตœ๊ทผ ์ปค๋ฐ‹์ด๋‚˜ ์—…๋ฐ์ดํŠธ์— ํ•ด๋‹นํ•˜๋Š” ๊ฐ’์„ ๋‚˜ํƒ€๋‚ด์ฃผ๋Š” ๋ถ€๋ถ„์ž…๋‹ˆ๋‹ค. ์•„๋ž˜์™€ ๊ฐ™์€ ํ˜•์‹์œผ๋กœ ๋ฐ์ดํ„ฐ๋ฅผ ๊ฐ€์ ธ์™€์„œ ๋„ฃ์–ด์ฃผ์„ธ์š”."
[![Commit Activity](https://img.shields.io/github/commit-activity/m/${githubRepo.slice(-2).join("/")})](https://github.com/${githubRepo.slice(-2).join("/")}/pulse)
# ๋ ˆํฌ์ง€ํ† ๋ฆฌ ์ด๋ฆ„
"๋ ˆํฌ์ง€ํ† ๋ฆฌ์— ๋Œ€ํ•œ ๊ฐ„๋žตํ•œ ์„ค๋ช…์ด ๋“ค์–ด๊ฐ€๋Š” ์œ„์น˜์ž…๋‹ˆ๋‹ค. ์œ„์˜ ํ”„๋กœ์ ํŠธ์— ๋Œ€ํ•œ ์„ค๋ช… ๋ฐ์ดํ„ฐ๋ฅผ ์ด์šฉํ•ด ์ž‘์„ฑํ•ด์ฃผ์„ธ์š”. ํ•ด๋‹นํ•˜๋Š” ๋‚ด์šฉ์„ ์ฐพ์„ ์ˆ˜ ์—†๋Š” ๊ฒฝ์šฐ '์ง์ ‘ ์ž‘์„ฑํ•ด์ฃผ์„ธ์š”'๋ผ๊ณ  ์ž‘์„ฑํ•ด์ฃผ์„ธ์š”."
# ๋ ˆํฌ์ง€ํ† ๋ฆฌ์˜ ์ด๋ฆ„
'Readme Monster๋Š” GitHub ๋ ˆํฌ์ง€ํ† ๋ฆฌ์˜ Readme ํŒŒ์ผ์„ ์ž๋™์œผ๋กœ ์ƒ์„ฑํ•ด์ฃผ๋Š” ์„œ๋น„์Šค์ž…๋‹ˆ๋‹ค.'
"๋ ˆํฌ์ง€ํ† ๋ฆฌ์— ๋Œ€ํ•œ ๊ฐ„๋žตํ•œ ์„ค๋ช…์ด ๋“ค์–ด๊ฐ€๋Š” ์œ„์น˜์ž…๋‹ˆ๋‹ค. ์œ„์—์„œ ์ „๋‹ฌ๋ฐ›์€ ํ”„๋กœ์ ํŠธ์— ๋Œ€ํ•œ ์„ค๋ช… ๋ฐ์ดํ„ฐ์™€ ๋ ˆํฌ์ง€ํ† ๋ฆฌ์˜ ์„ค๋ช… ๋ฐ์ดํ„ฐ๋ฅผ ์ด์šฉํ•ด ์ž์—ฐ์Šค๋Ÿฝ๊ฒŒ ์ž‘์„ฑํ•ด์ฃผ์„ธ์š”. ํ•ด๋‹น ๋ฐ์ดํ„ฐ๊ฐ€ ์—†๋Š” ๊ฒฝ์šฐ '์ง์ ‘ ์ž‘์„ฑํ•ด์ฃผ์„ธ์š”'๋ผ๊ณ  ์ž‘์„ฑํ•ด์ฃผ์„ธ์š”."
## ๋งํฌ
"๋ ˆํฌ์ง€ํ† ๋ฆฌ์— ๊ด€๋ จ๋œ ๋งํฌ๋“ค์ด ๋“ค์–ด๊ฐˆ ์œ„์น˜์ž…๋‹ˆ๋‹ค."
'- [์„œ๋น„์Šค ๋ฐ”๋กœ๊ฐ€๊ธฐ](๋ฐฐํฌ๋˜์–ด์žˆ๋Š” ๋งํฌ๊ฐ€ ๋“ค์–ด๊ฐˆ ์œ„์น˜)'
'- [๋””์ž์ธ](๋””์ž์ธ ๊ด€๋ จ ๋งํฌ๊ฐ€ ๋“ค์–ด๊ฐˆ ์œ„์น˜)'
'- [Wiki](์œ„ํ‚ค ๋งํฌ๊ฐ€ ๋“ค์–ด๊ฐˆ ์œ„์น˜)'
'- [Wiki](๊นƒํ—ˆ๋ธŒ ์œ„ํ‚คํƒญ์˜ ๋งํฌ๊ฐ€ ๋“ค์–ด๊ฐˆ ์œ„์น˜)'
## ๊ธฐ์ˆ  ์Šคํƒ
"ํ•ด๋‹น ๋ ˆํฌ์ง€ํ† ๋ฆฌ์—์„œ ์‚ฌ์šฉ๋œ ๊ธฐ์ˆ  ์Šคํƒ๋“ค์ด ๋“ค์–ด๊ฐˆ ์œ„์น˜์ž…๋‹ˆ๋‹ค. ์œ„์—์„œ ๊ฐ€์ ธ์˜จ ์ •๋ณด์ค‘์— ์‚ฌ์šฉํ•œ ๊ธฐ์ˆ  ์Šคํƒ์— ํ•ด๋‹นํ•˜๋Š” ๋‚ด์šฉ์„ ์ฐธ๊ณ ํ•ด์„œ ์ž‘์„ฑํ•ด์ฃผ์„ธ์š”"
"์•„๋ž˜์˜ ๋ฐฐ์ง€๋Š” ์˜ˆ์‹œ๋กœ ์‚ฌ์šฉ๋œ ๊ฒƒ์ด๋‹ˆ, ์ง์ ‘ ์‚ฌ์šฉํ•˜์‹ค ๋•Œ์—๋Š” ํ•ด๋‹น ๊ธฐ์ˆ  ์Šคํƒ์— ๋งž๋Š” ๋ฐฐ์ง€๋ฅผ ์‚ฌ์šฉํ•ด์ฃผ์„ธ์š”."
"ํ•ด๋‹น ๋ ˆํฌ์ง€ํ† ๋ฆฌ์—์„œ ์‚ฌ์šฉ๋œ ๊ธฐ์ˆ  ์Šคํƒ๋“ค์ด ๋“ค์–ด๊ฐˆ ์œ„์น˜์ž…๋‹ˆ๋‹ค. ์œ„์—์„œ ์ „๋‹ฌ๋ฐ›์€ ๋ ˆํฌ์ง€ํ† ๋ฆฌ์˜ ํ”„๋กœ๊ทธ๋ž˜๋ฐ ์–ธ์–ด ๋ฐ์ดํ„ฐ์™€ ์‚ฌ์šฉํ•œ ๊ธฐ์ˆ  ์Šคํƒ ๋ฐ์ดํ„ฐ๋ฅผ ๋ชจ๋‘ ์ถ”๊ฐ€ํ•ด์„œ ์ž‘์„ฑํ•ด์ฃผ์„ธ์š”"
"์•„๋ž˜์˜ ๋ฐฐ์ง€๋Š” ์˜ˆ์‹œ๋กœ ์‚ฌ์šฉ๋œ ๊ฒƒ์ด๋‹ˆ, ์ง์ ‘ ์‚ฌ์šฉํ•˜์‹ค ๋•Œ์—๋Š” ํ•ด๋‹น ๊ธฐ์ˆ  ์Šคํƒ์— ๋งž๋Š” ๋ฐฐ์ง€์— ๋Œ€ํ•œ ๋ฐ์ดํ„ฐ๋ฅผ ์‚ฌ์šฉํ•ด์ฃผ์„ธ์š”."
'![Badge](https://img.shields.io/badge/TypeScript-3178C6?style=flat&logo=typescript&logoColor=white)'
## ์„ค์น˜ ๋ฐฉ๋ฒ•
"ํ•ด๋‹น ํ”„๋กœ์ ํŠธ๋ฅผ ๋กœ์ปฌ ํ™˜๊ฒฝ์—์„œ ์‹คํ–‰์‹œํ‚ค๊ธฐ ์œ„ํ•ด ์‹คํ–‰ํ•ด์•ผํ•˜๋Š” ๋ช…๋ น์–ด๋“ค์ด ๋“ค์–ด๊ฐˆ ์œ„์น˜"
"์•„๋ž˜์˜ ์˜ˆ์‹œ๋Š” yarn์„ ์‚ฌ์šฉํ•˜๋Š” ๊ฒฝ์šฐ์ž…๋‹ˆ๋‹ค. ์œ„์—์„œ ์ฃผ์–ด์ง„ ์‚ฌ์šฉํ•˜๋Š” ํŒจํ‚ค์ง€ ๋งค๋‹ˆ์ € ๊ฐ’์— ๋”ฐ๋ผ์„œ ํ•ด๋‹นํ•˜๋Š” ํŒจํ‚ค์ง€ ๋งค๋‹ˆ์ €๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ์ถ”๊ฐ€ํ•ด์ฃผ์„ธ์š”."
'yarn install'
"์œ„์—์„œ ์ „๋‹ฌ๋ฐ›์€ ์‚ฌ์šฉํ•˜๋Š” ํŒจํ‚ค์ง€ ๋งค๋‹ˆ์ € ๋ฐ์ดํ„ฐ๊ฐ’์— ๋”ฐ๋ผ ํ•ด๋‹น ํŒจํ‚ค์ง€๋งค๋‹ˆ์ €๋ฅผ ์‚ฌ์šฉํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ์ถ”๊ฐ€ํ•ด์ฃผ์„ธ์š”."
## ํŒ€์›์„ ์†Œ๊ฐœํ•ฉ๋‹ˆ๋‹ค
Expand All @@ -92,22 +103,18 @@ export const CallGPT = async (repoData: RepoData) => {
'|[![](https://avatars.githubusercontent.com/u/ํŒ€์›1 avatar_url)](https://github.com/ํŒ€์›1)|[![](https://avatars.githubusercontent.com/u/ํŒ€์›2 avatar_url)](https://github.com/ํŒ€์›2)|[![](https://avatars.githubusercontent.com/u/ํŒ€์›3 avatar_url)](https://github.com/ํŒ€์›3)|[![](https://avatars.githubusercontent.com/u/ํŒ€์›4 avatar_url)](https://github.com/ํŒ€์›4)|'
'|:---:|:---:|:---:|:---:|'
'| ํŒ€์›1 ์ด๋ฆ„ | ํŒ€์›2 ์ด๋ฆ„ | ํŒ€์›3 ์ด๋ฆ„ | ํŒ€์›4 ์ด๋ฆ„ |'
'| ํŒ€์›1 | ํŒ€์›2 | ํŒ€์›3 | ํŒ€์›4 |'
## ์ฝ”๋“œ ๊ธฐ์—ฌ์ž
" ์ฝ”๋“œ ๊ธฐ์—ฌ์ž๋“ค์˜ GitHub ํ”„๋กœํ•„ ๋งํฌ๊ฐ€ ๋“ค์–ด๊ฐˆ ์œ„์น˜์ž…๋‹ˆ๋‹ค. ์ฝ”๋“œ ๊ธฐ์—ฌ์ž๋“ค์˜ ํ”„๋กœํ•„ ๋งํฌ๋ฅผ ์ถ”๊ฐ€ํ•ด์ฃผ์„ธ์š”."
`;
"์ฝ”๋“œ ๊ธฐ์—ฌ์ž๋“ค์˜ GitHub ํ”„๋กœํ•„ ๋งํฌ๊ฐ€ ๋“ค์–ด๊ฐˆ ์œ„์น˜์ž…๋‹ˆ๋‹ค. ์ฝ”๋“œ ๊ธฐ์—ฌ์ž๋“ค์˜ ํ”„๋กœํ•„ ๋งํฌ๋ฅผ ์ถ”๊ฐ€ํ•ด์ฃผ์„ธ์š”."
`;

const configuration = new Configuration({
apiKey: openAiKey,
});
const openai = new OpenAIApi(configuration);

// const prompt = "์•ˆ๋…•";

console.log("prompt", prompt);

try {
const response = await openai.createChatCompletion({
model: "gpt-3.5-turbo-16k",
Expand All @@ -127,5 +134,4 @@ export const CallGPT = async (repoData: RepoData) => {
console.error("Error generating README:", error);
throw new Error("Failed to generate README");
}

};
16 changes: 7 additions & 9 deletions src/components/Editor/Components/AiGenerator.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/* eslint-disable @typescript-eslint/ban-ts-comment */
// @ts-nocheck
import React, { useEffect, useRef, useState } from "react";
import { Configuration, OpenAIApi } from "openai-edge";
import axios from "axios";
import dayjs from "dayjs";

import LoadingSpinner from "components/Common/LoadingSpinner/LoadingSpinner";
import { CallGPT } from "api/gpt";
Expand Down Expand Up @@ -52,7 +52,7 @@ const AiGenerator = ({
if (description) {
setDescriptionList(description);
}
}, [githubAddress, openAiKey, techStack, packageManager]);
}, [githubAddress, openAiKey, techStack, packageManager, description]);

useEffect(() => {
if (formList) {
Expand All @@ -68,7 +68,7 @@ const AiGenerator = ({

const getRepos = async () => {
if (!githubRepo.length || !openAiToken) {
alert("Please enter the GitHub repository address and OpenAI key.");
alert("๊นƒํ—ˆ๋ธŒ ๋ ˆํฌ์ง€ํ† ๋ฆฌ ์ฃผ์†Œ์™€ OpenAI ํ‚ค๋ฅผ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”.");
return;
}

Expand All @@ -90,7 +90,6 @@ const AiGenerator = ({
member?.data.map(ele => ele.login).join(),
member?.data.map(ele => ele.avatar_url).join(),
);
// console.log("aiResponse", aiResponse);
// setResponseData(aiResponse.choices[0].message.content.trim());
}
} catch (error) {
Expand All @@ -116,7 +115,7 @@ const AiGenerator = ({

setIsLoading(true);
const stream = await CallGPT(repoData);
console.log(stream);

await handleStreamResponse(stream, chunk => {
if (responseContainerRef.current) {
responseContainerRef.current.innerText += chunk;
Expand All @@ -125,18 +124,17 @@ const AiGenerator = ({
});
};

console.log(responseData);

const handleCloseModal = () => {
setIsModalOpen(false);
if (prevResponseData.current !== responseData && responseData) {
prevResponseData.current = responseData;

const newSectionId = state.editSections.length + state.selectSections.length + 1;
const currentDateTime = dayjs().format("DD/MM/YY HH:mm");
const newSection = {
id: newSectionId,
name: "์ž๋™์ƒ์„ฑRM",
title: "์ž๋™์ƒ์„ฑRM",
name: `RM ${currentDateTime}`,
title: `RM ${currentDateTime}`,
markdown: responseData,
};

Expand Down
7 changes: 2 additions & 5 deletions src/components/Editor/Components/AutoForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const AutoForm = () => {
w-full h-[45px] p-[10px] ${link ? "pl-[40px]" : "pl-[10px]"}
rounded-[8px] drop-shadow-[0_1px_1px_rgba(173,181,189,0.25)] border border-[#F1F3F5]
focus:outline-none focus:ring-2 focus:ring-textBlue
placeholder-[#ADB5BD] placeholder:text-[14px]
placeholder-[#ADB5BD] placeholder:text-[14px] text-textPrimary
${value === "" ? "bg-red-100" : "bg-white"}
`;
};
Expand All @@ -48,9 +48,6 @@ const AutoForm = () => {
const packageManagerInputStyle = createInputStyle(packageManager);
const descriptionInputStyle = createInputStyle(description);

console.log("openAiKey", openAiKey);
console.log("githubAddress", githubAddress);
console.log("formList", formList);
return (
<div className="w-full h-full max-h-full rounded-[8px] bg-white border-solid border border-textTertiary p-[20px] flex flex-col gap-[30px]">
<div className="w-full min-h-[140px] flex-Center flex-col text-center">
Expand Down Expand Up @@ -146,7 +143,7 @@ const AutoForm = () => {
className="
w-full h-[45px] p-[10px]
focus:outline-none focus:ring-2 focus:ring-textBlue
rounded-[8px] border-solid border border-[#DEE2E6]
rounded-[8px] border-solid border border-[#DEE2E6] text-textPrimary
placeholder-[#ADB5BD] placeholder:text-[14px]
"
placeholder={"๊ฐ’์„ ์ž…๋ ฅํ•ด์ฃผ์„ธ์š”."}
Expand Down
4 changes: 2 additions & 2 deletions src/components/Editor/Modal/AddAutoContentsModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const AddSectionModal = ({ modalRef, modalOutSideClick, onClose, openModal, setF
<div
ref={modalRef}
onClick={e => modalOutSideClick(e)}
className="h-full w-full z-10 fixed left-0 top-0 flex-Center bg-textPrimary bg-opacity-70"
className="h-full w-full z-10 fixed left-0 top-0 flex-Center bg-textPrimary bg-opacity-70 p-[24px]"
>
<div className="w-full max-w-[550px] h-auto bg-white rounded-[8px] p-[20px] flex flex-col">
<div className="text-center p-[20px]">
Expand All @@ -47,7 +47,7 @@ const AddSectionModal = ({ modalRef, modalOutSideClick, onClose, openModal, setF
className="
w-full h-[45px] p-[10px]
rounded-[8px] border-solid border border-[#DEE2E6]
placeholder-[#ADB5BD] placeholder:text-[14px]
placeholder-[#ADB5BD] placeholder:text-[14px] text-textPrimary
focus:outline-none focus:ring-2 focus:ring-textBlue"
placeholder="์ถ”๊ฐ€ํ•  ์ •๋ณด์˜ ์ œ๋ชฉ์„ ์ž…๋ ฅํ•ด ์ฃผ์„ธ์š”."
onChange={e => setInfoTitle(e.target.value)}
Expand Down
3 changes: 2 additions & 1 deletion src/components/Editor/Modal/AddSectionModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ const AddSectionModal = ({ modalRef, modalOutSideClick, onClose, openModal }: Pr
id: createId,
name: title,
title: title,
markdown: `## ${title}
markdown: `
## ${title}
`,
};
Expand Down
6 changes: 3 additions & 3 deletions src/components/Editor/Modal/ResultContentsModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ const ResultContentsModal = forwardRef<HTMLDivElement, ModalProps>(({ isOpen, on
if (!isOpen) return null;

return (
<div className="fixed inset-0 flex items-center justify-center z-50 bg-gray-700 bg-opacity-75">
<div className="bg-white w-1/2 p-4 h-[80%] flex flex-col justify-around rounded-md">
<div ref={ref} className="p-4 h-[90%] overflow-scroll bg-gray-100 rounded-md" />
<div className="fixed inset-0 flex items-center justify-center z-50 bg-gray-700 bg-opacity-75 p-[24px]">
<div className="bg-white sm:w-1/2 w-full p-4 h-[80%] flex flex-col justify-around rounded-md">
<div ref={ref} className="p-4 h-[90%] overflow-scroll bg-gray-100 rounded-md text-textPrimary" />
<button onClick={onClose} className="mt-4 w-full bg-blue-500 text-white p-2 rounded-md hover:bg-blue-600">
๋‹ซ๊ธฐ
</button>
Expand Down
2 changes: 0 additions & 2 deletions src/components/MyPage/UserPrevious/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ const UserPreviousList = ({
const savedDate = new Date(seconds * 1000);
const difference = Math.floor((currentDate.getTime() - savedDate.getTime()) / (1000 * 3600 * 24));

console.log(difference);

if (difference === 0) {
return "Today";
} else if (difference === 1) {
Expand Down
Loading

0 comments on commit 1a5d157

Please sign in to comment.