-
Notifications
You must be signed in to change notification settings - Fork 1
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
Маршрут по тайным тропам #4
Conversation
/> | ||
<Route path={Routing.Offer}> | ||
<Route index element={<NotFound />} /> | ||
<Route path=':id' element={<Offer />} /> |
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.
лучше одним маршрутом
@@ -52,3 +52,19 @@ export const CARDS: Card[] = [ | |||
type: Place.Private | |||
} | |||
]; | |||
|
|||
export const LAYOUT_CLASSES: { [key in RoutingType]: string } = { |
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.
{ [key in RoutingType]: string } - Record<>
</form> | ||
<div className="cities__places-list places__list tabs__content"> | ||
{cards.map((card: Card) => ( | ||
<PlaceCard key={card.id} card={card}></PlaceCard> |
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.
<PlaceCard ... />
const isFooterExist = pathname === Routing.Favorites; | ||
|
||
return ( | ||
<div className={`page ${ layoutClass}`}> |
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.
своя утилита или clsx|classNames|etc.
🎓 Маршрут по тайным тропам