-
- { /**/ }
+
+ {props.columnVisibility.filter((c: IColumnVisibility) => c.column === "License")[0].visible
+ ? null
+ : }
;
\ No newline at end of file
diff --git a/src/FilterLists.Web/ClientApp/modules/home/components/detailsExpander/infoCard/License.tsx b/src/FilterLists.Web/ClientApp/modules/home/components/detailsExpander/infoCard/License.tsx
index 4bf26f4c1..a6222c8a9 100644
--- a/src/FilterLists.Web/ClientApp/modules/home/components/detailsExpander/infoCard/License.tsx
+++ b/src/FilterLists.Web/ClientApp/modules/home/components/detailsExpander/infoCard/License.tsx
@@ -1,12 +1,17 @@
import * as React from "react";
+import { ILicense } from "../../../interfaces";
-export const License = (props: any) =>
- props.name
- ? (props.descriptionUrl
+interface IProps {
+ license: ILicense;
+};
+
+export const License = (props: IProps) =>
+ props.license.name
+ ? (props.license.descriptionUrl
?
- License: {props.name}
+ License: {props.license.name}
:
- License: {props.name}
+ License: {props.license.name}
)
: null;
\ No newline at end of file
diff --git a/src/FilterLists.Web/ClientApp/modules/home/components/listsTable/ListsTable.tsx b/src/FilterLists.Web/ClientApp/modules/home/components/listsTable/ListsTable.tsx
index c527a3267..3c12cdd3c 100644
--- a/src/FilterLists.Web/ClientApp/modules/home/components/listsTable/ListsTable.tsx
+++ b/src/FilterLists.Web/ClientApp/modules/home/components/listsTable/ListsTable.tsx
@@ -44,6 +44,7 @@ export const ListsTable = (props: IProps) =>
list={mapListDetails(({
list: r.original,
languages: props.languages,
+ licenses: props.licenses,
maintainers: props.maintainers,
syntaxes: props.syntaxes,
tags: props.tags
@@ -55,6 +56,7 @@ export const ListsTable = (props: IProps) =>
interface ICreateListDtoProps {
list: IList;
languages: ILanguage[];
+ licenses: ILicense[];
maintainers: IMaintainer[];
syntaxes: ISyntax[];
tags: ITag[];
@@ -75,6 +77,7 @@ const mapListDetails = (props: ICreateListDtoProps): IListDetails =>
languages: props.list.languageIds
? props.languages.filter((l: ILanguage) => props.list.languageIds.indexOf(l.id) > -1)
: undefined,
+ license: props.licenses.filter((l: ILicense) => props.list.licenseId === l.id)[0],
maintainers: props.list.maintainerIds
? props.maintainers.filter((m: IMaintainer) => props.list.maintainerIds.indexOf(m.id) > -1)
: undefined,
diff --git a/src/FilterLists.Web/ClientApp/modules/home/interfaces/IList.ts b/src/FilterLists.Web/ClientApp/modules/home/interfaces/IList.ts
index a5b5e08dd..91861295d 100644
--- a/src/FilterLists.Web/ClientApp/modules/home/interfaces/IList.ts
+++ b/src/FilterLists.Web/ClientApp/modules/home/interfaces/IList.ts
@@ -10,7 +10,7 @@
homeUrl: string;
issuesUrl: string;
languageIds: number[];
- licenseId: string;
+ licenseId: number;
maintainerIds: number[];
name: string;
policyUrl: string;