mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
refactor(web): ♻ ren License Url
This commit is contained in:
parent
73b8d72656
commit
4e1634ca65
3 changed files with 6 additions and 6 deletions
|
|
@ -3,7 +3,7 @@ import * as React from "react";
|
|||
|
||||
interface Props {
|
||||
name: string;
|
||||
descriptionUrl?: string;
|
||||
url?: string;
|
||||
showLabel?: boolean;
|
||||
}
|
||||
|
||||
|
|
@ -12,15 +12,15 @@ export const LicenseTag = (props: Props) =>
|
|||
<span>
|
||||
{props.showLabel && <h3>License:</h3>}
|
||||
<Tag>
|
||||
<TagContents name={props.name} descriptionUrl={props.descriptionUrl} />
|
||||
<TagContents name={props.name} url={props.url} />
|
||||
</Tag>
|
||||
</span>
|
||||
) : null;
|
||||
|
||||
const TagContents = (props: Props) =>
|
||||
props.descriptionUrl ? (
|
||||
props.url ? (
|
||||
<a
|
||||
href={props.descriptionUrl}
|
||||
href={props.url}
|
||||
title={`View ${props.name}'s homepage.`}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ export const ListInfoDrawer = (props: RouteComponentProps & Props) => {
|
|||
{props.license && (
|
||||
<LicenseTag
|
||||
name={props.license.name}
|
||||
descriptionUrl={props.license.descriptionUrl}
|
||||
url={props.license.url}
|
||||
showLabel={true}
|
||||
/>
|
||||
)}
|
||||
|
|
|
|||
|
|
@ -374,7 +374,7 @@ export const ListsTable = (props: RouteComponentProps & Props) => {
|
|||
return license ? (
|
||||
<LicenseTag
|
||||
name={license.name}
|
||||
descriptionUrl={license.descriptionUrl}
|
||||
url={license.url}
|
||||
showLabel={false}
|
||||
/>
|
||||
) : null;
|
||||
|
|
|
|||
Loading…
Reference in a new issue