Cristiano Magro
2025-01-07 203c2c03ce649f54ee990489d9ac231f5bac0eda
10 - course project/xno-prj-cmp-01-starting-setup/src/components/learning-resource/TheResources.vue
@@ -56,6 +56,7 @@
    return {
      resources: this.storedResouces,
      addResource: this.addResource,
      deleteResource: this.removeResource,
    };
  },
  methods: {
@@ -73,6 +74,12 @@
      this.storedResouces.unshift(newResource);
      this.selectedTab = 'stored-resources';
    },
    removeResource(resId) {
      const resIndex = this.storedResouces.findIndex(
        (res) => res.id === resId
      );
      this.storedResouces.splice(resIndex, 1);
    },
  },
};
</script>