radar/twist-v2

View on GitHub
frontend/src/Book/link.tsx

Summary

Maintainability
A
0 mins
Test Coverage
const bookLink = (permalink: string, ref: string) => {
  let link;
  if (ref) {
    link = `/books/${permalink}/tree/${ref}`;
  } else {
    link = `/books/${permalink}`;
  }
  return link;
};

export default bookLink;