-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#35 によってカードが変わるけど、一旦は変わる前の状態で進めてください
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'use client';
が必要かも
<select | ||
name="languages" | ||
onChange={(e) => { | ||
setLanguage(e.target.value); | ||
setLanguageString(e.target.value); | ||
}} | ||
value={language} | ||
value={languageString} | ||
> |
There was a problem hiding this comment.
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)
(引数は文字列) にしたい
post, | ||
tag, | ||
language, | ||
setCode, | ||
setDescription, | ||
setLangId, | ||
setTitle, | ||
setUserUid, | ||
setTags, | ||
submit, | ||
tagString, | ||
setTagString, | ||
languageString, | ||
setLanguageString, |
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
onChange
がない
feat:languageの入力をID管理に変更
評価画面を作った
- em→pxに単位を変更 - コンポーネントに margin をもたせなくした - 画像をつかめないようにした
Closes
#11
説明
Postオブジェクトを作成し、そこにsetできる関数を作成し、PostPageLogicでreturnをしている。
現在の動作 (更新前)
ロジックが何もない状態
新しい動作 (更新後)
PostPageLogicでpost{title,descriptiona,tags,code}とそれぞれの要素を追加するset関数をreturnしている
追加情報