Skip to content

Commit

Permalink
[#127] fix: use correct api for ApartmentProfile
Browse files Browse the repository at this point in the history
  • Loading branch information
kaiNext committed Jul 11, 2020
1 parent cd1ed7e commit 09455be
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/containers/ApartmentProfile/index.jsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
import React from "react";
import PropTypes from "prop-types";

import SearchBar2 from "../../components/SearchBar/SearchBar2";
import styles from "./index.module.scss";
import DetailsCard from "./DetailsCard";
import { useParams } from "react-router-dom";
import Header from "./Header";
import { fetchApartments } from "../../api/api";
import { fetchApartmentById } from "../../api/api";
import { useFetch } from "../../hooks/useFetch";

const ApartmentProfile = () => {
const { apartmentId } = useParams();
const { data: apartment } = useFetch(fetchApartments, apartmentId);
const { data: apartment } = useFetch(fetchApartmentById, apartmentId);

return (
<div>
Expand Down Expand Up @@ -41,7 +40,3 @@ const ApartmentProfile = () => {
};

export default ApartmentProfile;

ApartmentProfile.propTypes = {
match: PropTypes.object
};

0 comments on commit 09455be

Please sign in to comment.