Skip to content

Commit

Permalink
refactor(Webpage): call AuthorString as a react component.
Browse files Browse the repository at this point in the history
  • Loading branch information
YishaiGlasner committed Mar 16, 2023
1 parent e2b07cd commit f7067c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions static/js/WebPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Sefaria from "./sefaria/sefaria";
import React from "react";


const AuthorString = (authors, isHebrew) => {
const AuthorString = ({authors, isHebrew}) => {
const authorsNum = authors?.length;
function getAuthorsAsString(lang, authors) {
const finalJoiner = (lang === 'he') ? ' ו' : ' and ';
Expand Down Expand Up @@ -37,7 +37,7 @@ const WebPage = ({authors, isHebrew, favicon, url, domain, title, description, a
<div className="domain">{domain}</div>
{description ? <div className="description">{description}</div> : null}
<div className="webpageMetadata">
{AuthorString(authors, isHebrew)}
<AuthorString authors={authors} isHebrew={isHebrew} />
{articleSource ? <div className="articleSource">
<InterfaceText>Source</InterfaceText>: {articleSource.title}{articleSource.related_parts ? ` ${articleSource.related_parts}`: ''}
</div> : null}
Expand Down

0 comments on commit f7067c9

Please sign in to comment.