From dc97319d759aabb2bf93086b26e930443405f042 Mon Sep 17 00:00:00 2001 From: "Collin M. Barrett" Date: Sat, 29 Aug 2020 14:52:00 -0500 Subject: [PATCH] =?UTF-8?q?Revert=20"Revert=20"refactor(web):=20=E2=99=BB?= =?UTF-8?q?=F0=9F=9A=A7=20match=20dto=20interfaces=20with=20revised=20api/?= =?UTF-8?q?data=20model""?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 451ff31f171acce6887a7ff2ead03865c7c80ce3. --- .../listInfoDrawer/ListInfoDrawer.tsx | 2 +- web/src/components/listsTable/ListDrawer.tsx | 4 +- web/src/components/listsTable/ListsTable.tsx | 14 +++---- .../maintainerCloud/MaintainerCloud.tsx | 4 +- .../components/maintainers/Maintainers.tsx | 4 +- web/src/interfaces/Language.ts | 3 +- web/src/interfaces/License.ts | 7 +++- web/src/interfaces/List.ts | 38 ++++++++++--------- web/src/interfaces/Maintainer.ts | 6 +-- web/src/interfaces/Software.ts | 6 ++- web/src/interfaces/Syntax.ts | 5 ++- web/src/interfaces/Tag.ts | 2 +- 12 files changed, 52 insertions(+), 43 deletions(-) diff --git a/web/src/components/listInfoDrawer/ListInfoDrawer.tsx b/web/src/components/listInfoDrawer/ListInfoDrawer.tsx index 9a80c9b4b..825b7200a 100644 --- a/web/src/components/listInfoDrawer/ListInfoDrawer.tsx +++ b/web/src/components/listInfoDrawer/ListInfoDrawer.tsx @@ -80,7 +80,7 @@ export const ListInfoDrawer = (props: RouteComponentProps & Props) => { {props.syntax && ( )} diff --git a/web/src/components/listsTable/ListDrawer.tsx b/web/src/components/listsTable/ListDrawer.tsx index 7c23b7074..0baac49b6 100644 --- a/web/src/components/listsTable/ListDrawer.tsx +++ b/web/src/components/listsTable/ListDrawer.tsx @@ -32,9 +32,9 @@ export const ListDrawer = (props: Props) => { - list.languageIds.includes(l.id) + list.languageIso6391s.includes(l.id) ) } license={ diff --git a/web/src/components/listsTable/ListsTable.tsx b/web/src/components/listsTable/ListsTable.tsx index c1f9af73f..9625dac63 100644 --- a/web/src/components/listsTable/ListsTable.tsx +++ b/web/src/components/listsTable/ListsTable.tsx @@ -217,10 +217,7 @@ export const ListsTable = (props: RouteComponentProps & Props) => { render={(syntaxId: number) => { const syntax = syntaxes.find((s) => s.id === syntaxId); return syntax ? ( - + ) : null; }} /> @@ -231,7 +228,7 @@ export const ListsTable = (props: RouteComponentProps & Props) => { key="Languages" dataIndex={nameof("languageIds")} sorter={(a, b) => - arraySorter(a.languageIds, b.languageIds, languages) + arraySorter(a.languageIso6391s, b.languageIso6391s, languages) } width={129} className={styles.nogrow} @@ -242,7 +239,8 @@ export const ListsTable = (props: RouteComponentProps & Props) => { {l.name}  ( { visibleLists.filter( - (li) => li.languageIds && li.languageIds.includes(l.id) + (li) => + li.languageIso6391s && li.languageIso6391s.includes(l.id) ).length } ) @@ -251,7 +249,9 @@ export const ListsTable = (props: RouteComponentProps & Props) => { value: l.id.toString(), }))} onFilter={(value, record) => - record.languageIds ? record.languageIds.includes(+value) : false + record.languageIso6391s + ? record.languageIso6391s.includes(+value) + : false } render={(languageIds: number[]) => languageIds ? ( diff --git a/web/src/components/maintainerCloud/MaintainerCloud.tsx b/web/src/components/maintainerCloud/MaintainerCloud.tsx index 155b92fe1..8974874da 100644 --- a/web/src/components/maintainerCloud/MaintainerCloud.tsx +++ b/web/src/components/maintainerCloud/MaintainerCloud.tsx @@ -12,10 +12,10 @@ export const MaintainerCloud = (props: Props) => props.maintainers && props.maintainers.length ? (
{props.maintainers.map((m: Maintainer, i: number) => - m.homeUrl ? ( + m.url ? ( { let actions = []; - if (props.maintainer.homeUrl) { + if (props.maintainer.url) { actions.push(