All files / client/src/markdown/components ProgramGuide.tsx

16.66% Statements 1/6
0% Branches 0/6
100% Functions 1/1
16.66% Lines 1/6

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22          356x                                
import { ReactNode } from "react";
import { useTranslation } from "react-i18next";
import { Link } from "react-router";
import { config } from "shared/config";
 
export const ProgramGuide = (): ReactNode => {
  const { i18n } = useTranslation();
  const { programGuideUrl } = config.event();
 
  if (programGuideUrl) {
    return (
      <Link to={programGuideUrl} target="_blank">
        {i18n.language === "fi" ? "ohjelmaoppaassa" : "program guide"}
      </Link>
    );
  }
 
  return (
    <span>{i18n.language === "fi" ? "ohjelmaoppaassa" : "program guide"}</span>
  );
};