<template>
  <div>
    <section id="portfolio">
      <div style="margin-top:-60px">
        <div class="container">
          <div class="row">
            <div class="col-lg-12">
              <h2>Latest Listings</h2>
            </div>
          </div>
        </div>
        <div class="contianer">
          <div class="row">
            <div class="col">
              <propertyCard
                v-if="latestProperties.length > 0"
                name="propertyholder"
                :properties="latestProperties"
                :showSort="false"
              />
            </div>
          </div>
        </div>
      </div>
    </section>
  </div>
</template>

<script>
/* eslint-disable */
import { mapState, mapActions } from "vuex";
import propertyCard from "../propertyCard";
export default {
  components: {
    propertyCard
  },
  methods: {
    ...mapActions("propertySearch", ["searchLatestPropertiesType"]),
    async LoadData() {
      await this.searchLatestPropertiesType("Residential");
      this.$forceUpdate();
    }
  },
  mounted() {
    this.LoadData();
  },
  computed: {
    ...mapState("propertySearch", ["latestProperties"])
  }
};
</script>

<style lang="scss" scoped></style>
