diff --git a/src/FilterLists.Web/ClientApp/modules/home/components/detailsExpander/DetailsExpander.tsx b/src/FilterLists.Web/ClientApp/modules/home/components/detailsExpander/DetailsExpander.tsx index 31940a62b..881f8fc6e 100644 --- a/src/FilterLists.Web/ClientApp/modules/home/components/detailsExpander/DetailsExpander.tsx +++ b/src/FilterLists.Web/ClientApp/modules/home/components/detailsExpander/DetailsExpander.tsx @@ -1,19 +1,25 @@ import * as React from "react"; +import { IColumnVisibility } from "../../interfaces"; import { IListDetails } from "./IListDetails"; import { InfoCard } from "./infoCard"; import { LinkButtonGroup } from "./LinkButtonGroup"; import { MaintainersInfoCard } from "./maintainersInfoCard"; -export const DetailsExpander = (props: IListDetails) => +interface IProps { + columnVisibility: IColumnVisibility[]; + list: IListDetails; +}; + +export const DetailsExpander = (props: IProps) =>
- - + +
- +
diff --git a/src/FilterLists.Web/ClientApp/modules/home/components/detailsExpander/DetailsExpanderContainer.tsx b/src/FilterLists.Web/ClientApp/modules/home/components/detailsExpander/DetailsExpanderContainer.tsx deleted file mode 100644 index a0357046e..000000000 --- a/src/FilterLists.Web/ClientApp/modules/home/components/detailsExpander/DetailsExpanderContainer.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import * as React from "react"; -import "isomorphic-fetch"; -import "../../../../utils/loader.css"; -import { IListDetails } from "./IListDetails"; -import { DetailsExpander } from "./DetailsExpander"; - -interface IProps { - list: IListDetails; -}; - -interface IState { -}; - -export class DetailsExpanderContainer extends React.Component { - constructor(props: IProps) { - super(props); - this.state = {}; - } - - render() { - return this.props.list.name - ? - :
Loading...
;; - } -}; \ No newline at end of file diff --git a/src/FilterLists.Web/ClientApp/modules/home/components/detailsExpander/index.ts b/src/FilterLists.Web/ClientApp/modules/home/components/detailsExpander/index.ts index 81d9e4ca1..6b887a094 100644 --- a/src/FilterLists.Web/ClientApp/modules/home/components/detailsExpander/index.ts +++ b/src/FilterLists.Web/ClientApp/modules/home/components/detailsExpander/index.ts @@ -1,7 +1,7 @@ -import { DetailsExpanderContainer } from "./DetailsExpanderContainer"; +import { DetailsExpander } from "./DetailsExpander"; import { IListDetails } from "./IListDetails"; export { - DetailsExpanderContainer as DetailsExpander, + DetailsExpander, IListDetails }; \ No newline at end of file diff --git a/src/FilterLists.Web/ClientApp/modules/home/components/detailsExpander/infoCard/InfoCard.tsx b/src/FilterLists.Web/ClientApp/modules/home/components/detailsExpander/infoCard/InfoCard.tsx index 7fdf7b020..2eb5bb464 100644 --- a/src/FilterLists.Web/ClientApp/modules/home/components/detailsExpander/infoCard/InfoCard.tsx +++ b/src/FilterLists.Web/ClientApp/modules/home/components/detailsExpander/infoCard/InfoCard.tsx @@ -1,4 +1,5 @@ import * as React from "react"; +import { IColumnVisibility } from "../../../interfaces"; import { IListLicense, IListSyntax, ISyntaxSupportedSoftware } from "../IListDetails"; import { ILanguage, ITag } from "../../../interfaces"; import { Description } from "./Description"; @@ -13,6 +14,7 @@ import { TagGroup } from "../../TagGroup" import { UpdatedDate } from "./UpdatedDate"; interface IProps { + columnVisibility: IColumnVisibility[]; description: string; descriptionSourceUrl: string; discontinuedDate: string; @@ -28,7 +30,9 @@ interface IProps { export const InfoCard = (props: IProps) =>
- + {props.columnVisibility.filter((c: IColumnVisibility) => c.column === "Tags")[0].visible + ? null + : }
{props.syntax ? props.syntax.supportedSoftware.map( 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 b8f64f6e2..1dfdd9b73 100644 --- a/src/FilterLists.Web/ClientApp/modules/home/components/listsTable/ListsTable.tsx +++ b/src/FilterLists.Web/ClientApp/modules/home/components/listsTable/ListsTable.tsx @@ -4,7 +4,8 @@ import "../../../../utils/loader.css"; import ReactTable from "react-table"; import "react-table/react-table.css"; import "./listsTable.css"; -import { DetailsButton, Languages, License, Maintainers, Name, RuleCount, Software, Tags, UpdatedDate } from "./columns"; +import { DetailsButton, Languages, License, Maintainers, Name, RuleCount, Software, Tags, UpdatedDate } from + "./columns"; import { IListDetails } from "../../components/detailsExpander"; import { DetailsExpander } from "../../components"; @@ -37,12 +38,14 @@ export const ListsTable = (props: IProps) => DetailsButton ]} defaultSorted={[{ id: "name" }]} - SubComponent={(r: any) => } + SubComponent={(r: any) => + } className="-striped -highlight"/> :
Loading...
;