This is a ReactJS app that allows users to remove duplicate characters from a string. It has two screens:
- Screen 1: A form where users can input a string and submit it to the app.
- Screen 2: A view where the app displays the original string, the current string, and a list of cards representing each character in the current. Users can click on the delete icon on each card to remove all duplicate instances of that character in the string except the one that is being clicked.
Note: Link to view the app: https://duplicate-char-remover.web.app/ . I have deployed it on firebase, more about it later in the readme.
- Clone the repository:
git clone https://github.com/Patel-Muhammad/frontend-engineering-octernship.git
- Navigate to the app directory:
cd app
- Install dependencies:
npm install
- Start the app locally:
npm start
- Open the app in browser:
http://localhost:3000
- Capital and small letters are considered the same.
All of the requirements for the project have been fulfilled:
- Users are not allowed to go to Screen 2 without providing a non-empty value in the input field on Screen 1.
- Clicking on a card delete icon on Screen 2 deletes all other appearances of the character in the string, except the one that is clicked and the current string is being updated on clicking the delete icon.(here I clicked on the letter "b" to show as an example)
- When there are no more characters with greater than 1 appearance in the string, a success header is rendered.
- The input field is cleared on return to first screen
Duplicate.character.remover.-.Google.Chrome.2023-03-22.14-56-05.mp4
- The project is written in ReactJS and uses react-toastify and react-icons library.
- The app is completely responsive and can be used on mobile phones as well.
- The app is deployed on Firebase. I also have created a workflow file for github actions so that the app is automatically built and deployed whenever a commit is made or a pull request is created on main branch.
Link to view the site: https://duplicate-char-remover.web.app/