Skip to content

Home Component

Sam Liu edited this page Mar 5, 2021 · 3 revisions

Overview

src/components/Home: holds all components associated with the home page.

Component Hierarchy

NavBar

  • Renders a navigation bar on the Home page with a button that links to the FAQ page.

ApartmentCard

  • Takes in info about the corresponding apartment as props.
  • Renders a card displaying a picture of the apartment and its location, company, rent, number of bedrooms/bathrooms, and number of reviews.
  • Responsive sizing is supported by material-ui's grid layout, so a row of ApartmentCard components will automatically resize based on screen width.
type Props = {
  address: string;
  company: string;
  bedsAndBaths: string;
  price: string;
  numReviews: string;
};

SectionDivider

  • Renders "Browse Renting Companies" and a divider.
  • Separates the navigation bar on the Home page from the apartment cards.