<template>
  <div class="edit-project-page">
    <edit-project :project="project" v-if="this.project.id"></edit-project>
  </div>
</template>

<script>
  // todo: refactor this, we don't need 2 components, remove editRoom or EditRoom component
  import EditProject from '@/components/portfolio/EditProject';

  import PROJECT_QUERY from '@/graphql/gql/projectQuery.gql';

  export default {
    props: ['id'],

    components: {
      EditProject
    },

    data() {
      return {
        project: {}
      }
    },

    apollo: {
      project: {
        query: PROJECT_QUERY,
        variables() {
          return {
            id: this.id
          }
        }
      }
    }
  }
</script>
