-
Notifications
You must be signed in to change notification settings - Fork 0
Week 3 #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| const [loading, setLoading] = useState(false); | ||
| const [showError, setShowError] = useState(false); | ||
| const [searchParams, setSearchParams] = useState<string | null>( | ||
| safeJsonParse(localStorage.savedSearch) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
если идут сложные вычисления то лучше использовать
(влияет на инициализацию стейта перед первым рендером)
const [searchParams, setSearchParams] = useState<string | null>(()=>
safeJsonParse(localStorage.savedSearch)
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ясно, поправила
src/App.tsx
Outdated
| const [isDataLoaded, setIsDataLoaded] = useState(false); | ||
| const [itemsPerPage, setItemsPerPage] = useState(30); | ||
| const [currPageNum, setCurrPageNum] = useState( | ||
| (segments[1].length > 5 && Number(segments[1].slice(5))) || null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
тоже самое
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
поправила
src/Components/Data/ProductImage.tsx
Outdated
| @@ -0,0 +1,35 @@ | |||
| import { useState, useContext } from 'react'; | |||
| import './ProductImage.css'; | |||
| import { ProductsContext } from '../../context/context'; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
может index? context/context не очень семантично выглядит
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
да, логично, поправила
src/main.tsx
Outdated
| import App from './App'; | ||
| import './index.css'; | ||
| import ErrorBoundary from './Components/ErrorBoundary/ErrorBoundary'; | ||
| import { BrowserRouter } from 'react-router-dom'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
порядок зависимостей, обычно с пэкэджей идут в начале
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ясно, исправлю везде
✋Hello, my dear Reviewer:))
See below at point 5 👇
Task: https://github.com/rolling-scopes-school/tasks/tree/master/react/modules/module03
Screenshot:


Deploy:rss-app-iriva0313-week3.netlify.app
Done 12.11.2023 / deadline 13.11.2023
Score: 100 / 100
-- Verify that the component renders the specified number of cards - Data.test.tsx;
-- Check that an appropriate message is displayed if no cards are present. - HomePage.test.tsx
-- Ensure that the card component renders the relevant card data; -ProductImage.test.tsx, Product.test.tsx
-- Validate that clicking on a card opens a detailed card component;-App.test.tsx
-- Check that clicking triggers an additional API call to fetch detailed information.-App.test.tsx
-- Check that a loading indicator is displayed while fetching data;-ProductPage.test.tsx
-- Make sure the detailed card component correctly displays the detailed card data;-ProductPage.test.tsx
-- Ensure that clicking the close button hides the component.-ProductPage.test.tsx
-- Make sure the component updates URL query parameter when page changes.-Pagination.test.tsx
-- Verify that clicking the Search button saves the entered value to the local storage;-App.test.tsx
-- Check that the component retrieves the value from the local storage upon mounting.-App.test.tsx
-- Ensure that the 404 page is displayed when navigating to an invalid route. - HomePage.test.tsx