Enhance the existing Book Library application by adding functionality to navigate to an "Add Book" form. This task focuses exclusively on frontend development using React and Vite.
- BookCard Component: Displays individual book details.
- Home Component: Renders a list of
BookCardcomponents.
- Placement: Position the "Add Book" button prominently on the Home page.
- Functionality: When clicked, the button should navigate the user to the "Add Book" form page.
-
Form Fields: Develop a form that includes the following input fields:
- Title (Text Input)
- Author (Text Input)
- Description (Textarea)
- Cover Image URL (URL Input)
-
Buttons:
- Submit: To hypothetically add the book (no actual functionality required).
-
Routing: Implement navigation between the Home page and the "Add Book" form.
Please feel free to style the component as you wish.
- You will be provided with a StackBlitz link for the assignment.
- Open the link in your browser and click on the Fork button in StackBlitz.
This will create a copy of the repository in your StackBlitz account.
- After forking, you can download the project or push it directly to your personal GitHub repository:
- Option 1: Download and Push
- Download the repository files from StackBlitz.
- Open your terminal/command prompt, navigate to the project folder, and run:
Replace
git init git remote add origin <your_github_repo_url>
<your_github_repo_url>with your personal GitHub repository URL. - Commit and push the files to your GitHub repository:
git add . git commit -m "Completed the assignment" git push -u origin main
- Option 2: Push Directly
- Use the Push to GitHub option in StackBlitz to directly connect and push the repository to your GitHub account.
- Option 1: Download and Push
- Once your code is successfully pushed to GitHub:
- Copy the link to your GitHub repository.
- Submit the link on the assignment submission portal.
The link should follow this format:
https://github.com/<your_username>/<repository_name>
If your GitHub username is johnDoe and the repository name is assignment-repo, the submission link would look like this:
https://github.com/johnDoe/assignment-repo