Skip to content
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

Merged
merged 3 commits into from
Nov 5, 2024

Conversation

stas2nd
Copy link

@stas2nd stas2nd commented Nov 4, 2024

@keksobot keksobot changed the title 3.13. Маршрут по тайным тропам Маршрут по тайным тропам Nov 4, 2024
/>
<Route path={Routing.Offer}>
<Route index element={<NotFound />} />
<Route path=':id' element={<Offer />} />
Copy link

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 } = {
Copy link

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>
Copy link

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}`}>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

своя утилита или clsx|classNames|etc.

@keksobot keksobot merged commit d1aaa58 into htmlacademy-react:master Nov 5, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants