Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat:出展画面のオブジェクトロジック完成 #23

Merged
merged 31 commits into from
Oct 29, 2024

Conversation

nishi240masa
Copy link
Contributor

Closes
#11

説明

Postオブジェクトを作成し、そこにsetできる関数を作成し、PostPageLogicでreturnをしている。

現在の動作 (更新前)

ロジックが何もない状態

新しい動作 (更新後)

PostPageLogicでpost{title,descriptiona,tags,code}とそれぞれの要素を追加するset関数をreturnしている

追加情報

@nishi240masa nishi240masa linked an issue Sep 30, 2024 that may be closed by this pull request
Copy link
Member

@SatooRu65536 SatooRu65536 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#35 によってカードが変わるけど、一旦は変わる前の状態で進めてください

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'use client';
が必要かも

Comment on lines 55 to 61
<select
name="languages"
onChange={(e) => {
setLanguage(e.target.value);
setLanguageString(e.target.value);
}}
value={language}
value={languageString}
>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

value には 言語名(JavaScript) ではなく、言語のID を渡すべき
それに合わせて setLanguageString ではなく function setLanguage(idString: string) (引数は文字列) にしたい

Comment on lines 27 to 40
post,
tag,
language,
setCode,
setDescription,
setLangId,
setTitle,
setUserUid,
setTags,
submit,
tagString,
setTagString,
languageString,
setLanguageString,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ここら辺全てちゃんと使ってあげて
setLanguageString 等の不要なもの(後述)もあるから、それは渡さない
(そもそも関数自体が不要なものもあるかも)

</div>
</div>
<div className={styles.codeArea}>
<p>Kuso Code</p>
<textarea name="code">{code}</textarea>
<textarea name="code">{post.code}</textarea>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

onChange がない

@SatooRu65536 SatooRu65536 merged commit 8586fc1 into main Oct 29, 2024
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

出展画面のロジックを追加する
3 participants