-
Notifications
You must be signed in to change notification settings - Fork 0
マイページの実装 #143
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
マイページの実装 #143
Conversation
| <Button fz="xs" color="blue" onClick={handleReturnButtonClick}> | ||
| 返却する | ||
| </Button> |
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.
「借りる」ボタンが青だから「返却する」ボタンは青とは対照的な色を使った方がいいと思う
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.
赤色にした
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.
| <Text size={rem(50)}>{name}</Text> | ||
| <Text>{email}</Text> |
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.
フォントサイズに差がありすぎると思う
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.
プロフィール表示コンポーネント調整の時についでに直してくれい
| const handlePaginationChange = (newPage: number) => { | ||
| let url = '/home/me'; | ||
| let initial = true; | ||
| if (limit) { | ||
| url = | ||
| initial === true ? `${url}?limit=${limit}` : `${url}&limit=${limit}`; | ||
| initial = false; | ||
| } | ||
| url = | ||
| initial === true ? `${url}?page=${newPage}` : `${url}&page=${newPage}`; | ||
| navigate(url); | ||
| }; |
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.
URLSearchParam を使って書きたい
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.
書き直した
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.
frontend/app/stores/loanAtom.ts
Outdated
| @@ -0,0 +1,9 @@ | |||
| import { atom } from 'jotai'; | |||
| import { CartProps } from './cartAtom'; | |||
| import { atomWithStorage, createJSONStorage } from 'jotai/utils'; | |||
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.
使ってないから消しておこう
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.
消しました
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.
| const isSelected = (element: CartProps) => element.id === id; | ||
|
|
||
| // 該当する本のvolumeを変更する | ||
| const handleChangeVolume = (id: number, value: number) => { |
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.
僕だったら handleVolumeChange にするかな
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.
変更した
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.
| }), | ||
| ); | ||
| const target = selectedCartBook.find(isSelected); | ||
| // volumeを選択されていた本がすでに選択されている場合 |
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.
「volumeを選択されていた」の部分が理解できなかった
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.
変更した
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.
| if (element.id === id) { | ||
| return { | ||
| id: element.id, | ||
| stock: element.stock, | ||
| thumbnail: element.thumbnail, | ||
| volume: value, | ||
| }; | ||
| } | ||
| return element; |
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.
同じ値返してない?
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.
これは、elementがvolumeが選択された本やったら、volumeを更新して、それ以外なら、elementをそのままにするって処理です。これをmapで繰り返して、配列を更新してる
| </Stack> | ||
| </Dialog> | ||
| ); | ||
| return <div>CartSelectedDialog</div>; |
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.
🙏
| const isSelected = (element: CartProps) => element.id === id; | ||
|
|
||
| // 該当する本のvolumeを変更する | ||
| const handleChangeVolume = (id: number, value: number) => { |
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.
僕だったら handleVolumeChange にするかな
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.
変更した
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.
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.
このコンポーネントのUIは考え直したいね
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.
一応作ってくれたんやね
| // 操作する貸出履歴のvolumesを管理するAtom | ||
| export const displayLoanAtom = atom<CartProps[]>([]); |
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.
これを定義した理由を教えて欲しい
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.
volumeを操作するデータが欲しいからやね。
チェックボックスにチェックが入ってないデータもvolumeを変えたいから、selected...とは別にデータが必要だった感じ。
|
スクリーンショットありがとう |
| session.flash('success', 'ログインに成功しました'); | ||
|
|
||
| return redirect('/home/mypage', { | ||
| return redirect('/home/me', { |
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.
ここを書き換えるとログインページのテストが落ちると思う
テストコードも修正しておこう
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.
修正した bbdf330
|
ユーザーデータのコンポーネント |

やったこと
確認した方法
pnpm run devで確かめたスクリーンショット
自動生成したコード