Skip to content

Refactor toast handling into reusable AppToastContainer component#66

Open
alceil wants to merge 1 commit into
masterfrom
codex/refactor-code-for-reusable-components
Open

Refactor toast handling into reusable AppToastContainer component#66
alceil wants to merge 1 commit into
masterfrom
codex/refactor-code-for-reusable-components

Conversation

@alceil
Copy link
Copy Markdown
Owner

@alceil alceil commented May 2, 2026

Motivation

  • Consolidate duplicated react-toastify setup into a single reusable component to keep toast behavior consistent across screens.
  • Reduce UI duplication and make per-screen tweaks (color, left padding, newest-on-top) configurable via props.

Description

  • Added a new AppToastContainer component at src/components/AppToastContainer/AppToastContainer.jsx that centralizes ToastContainer defaults and imports the react-toastify CSS.
  • Replaced inline ToastContainer usage in src/components/App/App.jsx with <AppToastContainer paddingLeft="5rem" /> and kept toast usage for firing messages.
  • Replaced inline ToastContainer usage in src/components/SharePage/SharePage.jsx with <AppToastContainer color="black" paddingLeft="3rem" /> and removed the now-duplicated CSS import.
  • Replaced inline ToastContainer usage in src/components/Modal/Modal.jsx with <AppToastContainer color="black" paddingLeft="6rem" newestOnTop /> and removed the duplicated CSS import.

Testing

  • Ran npm run build in this environment and the build failed because react-scripts is not installed, so no production build artifact was produced.

Codex Task

@netlify
Copy link
Copy Markdown

netlify Bot commented May 2, 2026

Deploy Preview for justpasteit failed.

Name Link
🔨 Latest commit 8778d15
🔍 Latest deploy log https://app.netlify.com/projects/justpasteit/deploys/69f6802c0c4c300008e5b5af

@alceil
Copy link
Copy Markdown
Owner Author

alceil commented May 2, 2026

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant