<commit_before>import React from "react";
import Link from "component/link";

export default ({
  channelName,
  uri,
  subscriptions,
  doChannelSubscribe,
  doChannelUnsubscribe
 }) => {

  const isSubscribed =
    subscriptions
      .map(subscription => subscription.channelName)
      .indexOf(channelName) !== -1;

  const subscriptionHandler = isSubscribed
    ? doChannelUnsubscribe
    : doChannelSubscribe;

  const subscriptionLabel = isSubscribed ? __("Unsubscribe") : __("Subscribe");

  return channelName && uri ? (
    <div className="card__actions">
      <Link
        button={isSubscribed ? "alt" : "primary"}
        label={subscriptionLabel}
        onClick={() => subscriptionHandler({
          channelName,
          uri,
        })}
      />
    </div>
  ) : "";
}<commit_msg>return null instead of empty string<commit_after>import React from "react";
import Link from "component/link";

export default ({
  channelName,
  uri,
  subscriptions,
  doChannelSubscribe,
  doChannelUnsubscribe
 }) => {

  const isSubscribed =
    subscriptions
      .map(subscription => subscription.channelName)
      .indexOf(channelName) !== -1;

  const subscriptionHandler = isSubscribed
    ? doChannelUnsubscribe
    : doChannelSubscribe;

  const subscriptionLabel = isSubscribed ? __("Unsubscribe") : __("Subscribe");

  return channelName && uri ? (
    <div className="card__actions">
      <Link
        button={isSubscribed ? "alt" : "primary"}
        label={subscriptionLabel}
        onClick={() => subscriptionHandler({
          channelName,
          uri,
        })}
      />
    </div>
  ) : null;
}
{'fraction_non_alphanumeric': 0.11931119311193111, 'fraction_numerical': 0.0012300123001230013, 'mean_word_length': 3.0073891625615765, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 15, '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': '4145563', 'n_tokens_mistral': 455, 'n_tokens_neox': 451, 'n_words': 100}