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

Issue/259 #274

Merged
merged 2 commits into from
Jan 21, 2025
Merged

Issue/259 #274

merged 2 commits into from
Jan 21, 2025

Conversation

aowheel
Copy link
Collaborator

@aowheel aowheel commented Jan 21, 2025

Description

Fixes #259

remixではssrの関係でremix-toastがないとreact-toastifyなどのtoastライブラリが使えない

remix-toastの最新バージョンはreact-routerにしか対応していないので(remix-ってついているのに)、remix対応のv1.2.2に落としてインストールした

react-routerに移行する場合はremix-toastもバージョンを上げる必要があるかも

実装内容

  • root.tsxにtoastを使うための設定を追加
  • transferFractionToken関数内で発生したエラーごとのメッセージをerror変数に格納し、onClickイベントでその内容がtoastとして表示されるようにした
  • toastはimport { toast } from "react-toastify"でどこでも使える

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Screenshots

If applicable, add screenshots to help explain your problem.

@yu23ki14 yu23ki14 merged commit 52af295 into main Jan 21, 2025
2 checks passed
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.

アシストクレジット送信時にエラーが発生した時メッセージが出ない
2 participants