dev #1

Merged
sumitdml123 merged 4 commits from dev into main 2025-01-03 05:38:57 +00:00
Owner
No description provided.
veerjot_dml added 3 commits 2025-01-02 05:59:44 +00:00
veerjot_dml requested review from sumitdml123 2025-01-02 05:59:53 +00:00
veerjot_dml requested review from mayank.sethi 2025-01-02 05:59:54 +00:00
sumitdml123 requested changes 2025-01-02 12:23:12 +00:00
Dismissed
src/App.js Outdated
@ -0,0 +6,4 @@
import BreedInfoPage from "./components/BreedInfoPage";
import "./App.css";
import { debounce } from "lodash";
const apikey ="live_8bnMZatSzkOR7eyT6o0iwDmXQuTxPI3deVWy0KY2ABxDkTMJdTYZ13S9lVFmrZRO"
Collaborator

better use more secure way to store the keys create one env file to store these keys and access them from there

better use more secure way to store the keys create one env file to store these keys and access them from there
@ -0,0 +2,4 @@
import { useParams, useNavigate } from "react-router-dom";
const API_URL = "https://api.thecatapi.com/v1";
const API_KEY = "live_8bnMZatSzkOR7eyT6o0iwDmXQuTxPI3deVWy0KY2ABxDkTMJdTYZ13S9lVFmrZRO";
Collaborator

same here as well

same here as well
@ -0,0 +6,4 @@
<h2 className="fav-heading">Favorites Gallery</h2>
<div className="favorites">
{favorites.map((cat) => (
<div key={cat.id} className="cat-item">
Collaborator

use optional chaining here use cat?.id instead of cat.id

use optional chaining here use cat?.id instead of cat.id
@ -0,0 +8,4 @@
type="text"
name="breed"
placeholder="Search by breed name"
value={filters.breed}
Collaborator

use optional chaining here as well

use optional chaining here as well
@ -0,0 +15,4 @@
<select
name="hairLength"
value={filters.hairLength}
Collaborator

use optional chaining here

use optional chaining here
@ -0,0 +14,4 @@
const handleCatClick =(cat)=>{
console.log('id',cat)
if (cat.breeds && cat.breeds[0] && cat.breeds[0].id) {
navigate(`/breed/${cat.breeds[0].id}`);
Collaborator

whenever use navigation start using optional chaining that will reduce the chance of breakage

whenever use navigation start using optional chaining that will reduce the chance of breakage
veerjot_dml added 1 commit 2025-01-02 12:57:21 +00:00
veerjot_dml requested review from sumitdml123 2025-01-03 03:59:44 +00:00
sumitdml123 approved these changes 2025-01-03 05:38:53 +00:00
sumitdml123 merged commit 36e1696938 into main 2025-01-03 05:38:57 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: veerjot_dml/assignment4_api#1
No description provided.