Commit 65cdb187 authored by Nathan Chu's avatar Nathan Chu
Browse files

remove unused code

parent b0362c4e
Loading
Loading
Loading
Loading
+3 −9
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@ const renderRepoCard = (repo, options = {}) => {
  const multiLineDescription = wrapTextMultiline(desc);
  const descriptionLines = multiLineDescription.length;
  const lineHeight = 10;

  const height =
    (descriptionLines > 1 ? 120 : 110) + descriptionLines * lineHeight;

@@ -56,7 +57,7 @@ const renderRepoCard = (repo, options = {}) => {
    bg_color,
    theme,
  });
  const isGradient = typeof bgColor == 'object';

  const totalStars = kFormatter(stargazers.totalCount);
  const totalForks = kFormatter(forkCount);

@@ -74,14 +75,7 @@ const renderRepoCard = (repo, options = {}) => {
      </text>
    </g>
  `;
  const gradient = isGradient ? `
    <defs>
      <linearGradient id="gradient" gradientTransform="rotate(${bgColor[0]})">
        <stop offset="0%"  stop-color="#${bgColor[1]}" />
        <stop offset="100%" stop-color="#${bgColor[2]}" />
      </linearGradient>
    </defs>`
    : undefined

  const svgLanguage = primaryLanguage
    ? `
    <g data-testid="primary-lang" transform="translate(30, 0)">
+0 −2
Original line number Diff line number Diff line
@@ -55,7 +55,6 @@ const renderStatsCard = (stats = {}, options = { hide: [] }) => {

  const lheight = parseInt(line_height, 10);


  // returns theme based colors with proper overrides and defaults
  const { titleColor, textColor, iconColor, bgColor } = getCardColors({
    title_color,
@@ -65,7 +64,6 @@ const renderStatsCard = (stats = {}, options = { hide: [] }) => {
    theme,
  });

  const isGradient = typeof bgColor == 'object';
  // Meta data for creating text nodes with createTextNode function
  const STATS = {
    stars: {
+2 −1
Original line number Diff line number Diff line
@@ -95,6 +95,7 @@ const renderTopLanguages = (topLangs, options = {}) => {
  const totalLanguageSize = langs.reduce((acc, curr) => {
    return acc + curr.size;
  }, 0);

  // returns theme based colors with proper overrides and defaults
  const { titleColor, textColor, bgColor } = getCardColors({
    title_color,
@@ -102,7 +103,7 @@ const renderTopLanguages = (topLangs, options = {}) => {
    bg_color,
    theme,
  });
  const isGradient = typeof bgColor == 'object';

  let width = isNaN(card_width) ? 300 : card_width;
  let height = 45 + (langs.length + 1) * 40;