lokytech5 / e-get-why

An open-source social networking platform for Nigerians to share their frustrations, societal issues, and professional challenges.
https://e-get-why.vercel.app
MIT License
0 stars 2 forks source link

Set Up Toast Notifications with react-toastify #23

Closed lokytech5 closed 1 month ago

lokytech5 commented 1 month ago

Feature Request: Set Up Toast Notifications with react-toastify

Description

This task aims to install react-toastify for toast notifications and create a toast component to display notifications across the application.

Tasks

  1. Navigate to the frontend folder using this command

     cd frontend
  2. Install react-toastify:

    • Install react-toastify using npm.
      npm install react-toastify
  3. Set Up Toast Notifications:

    • Create a new file called ToastNotify.tsx in the app/components directory.
    • Configure the ToastContainer component.
    • Create a utility function to display different types of toast notifications.
  4. Integrate Toast Container in Layout Component:

    • Ensure the ToastContainer is included in layout component.

Additional Notes

Guidelines to Follow:

Create ToastNotify.tsx:

     import React from 'react';
     import { ToastContainer, toast } from 'react-toastify';
     const ToastNotify = () => {
       return <ToastContainer position="bottom-right" autoClose={5000} hideProgressBar={false} newestOnTop={false} 
     closeOnClick={true} draggable={true} pauseOnHover={true} />;
     };

     export default ToastNotify;

Create Utility Functions for Toast Notifications:

Integrate Toast Container in Layout Component:

lokytech5 commented 1 month ago

let me know if there is anything not clear.

aedoardo1990 commented 1 month ago

good morning @lokytech5 , sure! working on it

aedoardo1990 commented 1 month ago

pull request open

lokytech5 commented 1 month ago

good day @aedoardo1990. am checking the pr