<commit_before><template lang='pug'>
  .item-view(v-if='item')
    template(v-if='item')
      .item-view-text
        h1 {{ item.title }}
        p {{ item.description }}
      .item-view-img(:style='{ backgroundImage: `url(${item.imageURL})` }')
      .item-view-social
      .item-view-nav
      .item-view-comments
        spinner(:show='loading')
        .comment-children(v-if='!loading')
          comment(v-for='id in item.commentIds'  :key='id'  :id='id')
</template>

<script>
import Spinner from '@/components/Spinner.vue'
import Comment from '@/components/Comment.vue'

export default {
  name: 'playlist-view',
  components: { Spinner, Comment },

  data: () => ({
    loading: true
  }),

  asyncData ({ store, route: { params: { id }}}) {
    return store.dispatch('FETCH_ITEMS', { ids: [id] })
  },

  title () {
    return this.item.title
  },

  beforeMount () {
    this.fetchComments()
  },

  watch: {
    item: 'fetchComments'
  },

  methods: {
    fetchComments () {<commit_msg>Bug fix<commit_after><template lang='pug'>
  .item-view(v-if='item')
    template(v-if='item')
      .item-view-text
        h1 {{ item.title }}
        p {{ item.description }}
      .item-view-img(:style='{ backgroundImage: `url(${item.imageURL})` }')
      .item-view-social
      .item-view-nav
      .item-view-comments
        spinner(:show='loading')
        .comment-children(v-if='!loading')
          comment(v-for='id in item.commentIds'  :key='id'  :id='id')
</template>

<script>
import Spinner from '@/components/Spinner.vue'
import Comment from '@/components/Comment.vue'

export default {
  name: 'playlist-view',
  components: { Spinner, Comment },

  data: () => ({
    loading: true
  }),

  computed: {
    item () {
      return this.$store.state.items[this.$route.params.id]
    }
  },

  asyncData ({ store, route: { params: { id }}}) {
    return store.dispatch('FETCH_ITEMS', { ids: [id] })
  },

  title () {
    return this.item.title
  },

  beforeMount () {
    this.fetchComments()
  },

  watch: {
    item: 'fetchComments'
  },

  methods: {
    fetchComments () {
{'fraction_non_alphanumeric': 0.18493803622497618, 'fraction_numerical': 0.0009532888465204957, 'mean_word_length': 2.6695804195804196, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '502746', 'n_tokens_mistral': 733, 'n_tokens_neox': 711, 'n_words': 127}