import { i18n } from '../i18next';
interface CakeDayProps {
- creator_name: string;
- is_post_creator?: boolean;
+ creatorName: string;
}
export class CakeDay extends Component<CakeDayProps, any> {
render() {
- const { creator_name, is_post_creator } = this.props;
-
return (
<div
- className={`mr-lg-2 d-inline-block unselectable pointer${
- is_post_creator ? ' mx-2' : ''
- }`}
- data-tippy-content={this.cakeDayTippy(creator_name)}
+ className={`mx-2 d-inline-block unselectable pointer`}
+ data-tippy-content={this.cakeDayTippy()}
>
<svg class="icon icon-inline">
<use xlinkHref="#icon-cake"></use>
);
}
- cakeDayTippy(creator_name: string): string {
- return i18n.t('cake_day_info', { creator_name });
+ cakeDayTippy(): string {
+ return i18n.t('cake_day_info', { creator_name: this.props.creatorName });
}
}