<template>
  <div class="edit-project-page">
    <edit-project
      :project="project"
      v-if="project.id"/>
  </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/queries/projectQuery.gql';

  export default {
    props: ['id'],

    components: {
      EditProject
    },

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

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