<commit_before><template>
  <projects
    :project-config="projectConfig"
    :project-content="projectContent"
    :env="env"
    :subpage-id="subpageId"
    :page-title="pageTitle"
  />
</template>

<script lang="ts">
import 'reflect-metadata'
import { Vue, Component } from 'vue-property-decorator'
import {
  Env,
  StoredProjectConfig,
  PageContent
} from '../../../../../shared/types'
import { getProjectConfig, getProjectContent, getSubpage } from '../../../../assets/dbUtils'

import Projects from '@/components/Projects/index.vue'

// TODO: remove :any's
function calculatePageTitle (projectContent: any, pageContent: any, repo : string) : string {
  // Choose the page name depending on available info:
  // Option 0 - title of the header section
  // Option 1 - the name from the config.
  // Option 2 - the repo name
  if (projectContent.header.name) {
    return projectContent.header.name
  } else if (pageContent.name) {
    return pageContent.name
  } else {
    return repo<commit_msg>fix: fixed calculatePageTitle typings<commit_after><template>
  <projects
    :project-config="projectConfig"
    :project-content="projectContent"
    :env="env"
    :subpage-id="subpageId"
    :page-title="pageTitle"
  />
</template>

<script lang="ts">
import 'reflect-metadata'
import { Vue, Component } from 'vue-property-decorator'
import {
  Env,
  StoredProjectConfig,
  PageContent
} from '../../../../../shared/types'
import { getProjectConfig, getProjectContent, getSubpage } from '../../../../assets/dbUtils'

import Projects from '@/components/Projects/index.vue'

function calculatePageTitle (pageContent: PageContent, projectConfig: StoredProjectConfig, repo : string) : string {
  // Choose the page name depending on available info:
  // Option 0 - title of the header section
  // Option 1 - the name from the config.
  // Option 2 - the repo name
  if (pageContent.header.name) {
    return pageContent.header.name
  } else if (projectConfig.name) {
    return projectConfig.name
  } else {
    return repo
{'fraction_non_alphanumeric': 0.13609467455621302, 'fraction_numerical': 0.0029585798816568047, 'mean_word_length': 3.4889380530973453, 'pattern_counts': {'":': 0, '<': 11, '<?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': '6188623', 'n_tokens_mistral': 601, 'n_tokens_neox': 595, 'n_words': 167}