<commit_before>'use strict'
import React from 'react'
import ReactDOM from 'react-dom'
import Navbar from '../AddOn/Navbar'

/* global entry */

const rightSide = (
  <li>
    <a>
      <em>
        Story status:
      </em>&nbsp;
      <span id="story-status">
        {status}
      </span>
    </a>
  </li>
)

const leftSide = (
  <li>
    <a href={`./stories/${entry.urlTitle}`}>View story</a>
  </li>
)


ReactDOM.render(
  <Navbar header="Edit story" rightSide={rightSide} leftSide={leftSide}/>,
  document.getElementById(
    'Navbar'
  )
)<commit_msg>Not showing view link if there isn't a title (i.e. no content)<commit_after>'use strict'
import React from 'react'
import ReactDOM from 'react-dom'
import Navbar from '../AddOn/Navbar'

/* global entry */

const rightSide = (
  <li>
    <a>
      <em>
        Story status:
      </em>&nbsp;
      <span id="story-status">
        {status}
      </span>
    </a>
  </li>
)

let leftSide
if (entry.urlTitle.length > 0) {
  leftSide = (
    <li>
      <a href={`./stories/${entry.urlTitle}`}>View story</a>
    </li>
  )
}

ReactDOM.render(
  <Navbar header="Edit story" rightSide={rightSide} leftSide={leftSide}/>,
  document.getElementById(
    'Navbar'
  )
)
{'fraction_non_alphanumeric': 0.17077175697865354, 'fraction_numerical': 0.0008210180623973727, 'mean_word_length': 2.6716867469879517, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 30, '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': '7219481', 'n_tokens_mistral': 443, 'n_tokens_neox': 443, 'n_words': 105}