From 8dc6d5d4275c70906880dd00de5be0773d450ad6 Mon Sep 17 00:00:00 2001 From: "Collin M. Barrett" Date: Sat, 29 Aug 2020 09:18:44 -0500 Subject: [PATCH] =?UTF-8?q?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 cf01a8260b62ab291ef2e9887def3523c3562b98. --- .../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 | 36 +++++++++---------- 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, 42 insertions(+), 51 deletions(-) diff --git a/web/src/components/listInfoDrawer/ListInfoDrawer.tsx b/web/src/components/listInfoDrawer/ListInfoDrawer.tsx index 825b7200a..9a80c9b4b 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 0baac49b6..7c23b7074 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.languageIso6391s.includes(l.id) + list.languageIds.includes(l.id) ) } license={ diff --git a/web/src/components/listsTable/ListsTable.tsx b/web/src/components/listsTable/ListsTable.tsx index 9625dac63..c1f9af73f 100644 --- a/web/src/components/listsTable/ListsTable.tsx +++ b/web/src/components/listsTable/ListsTable.tsx @@ -217,7 +217,10 @@ export const ListsTable = (props: RouteComponentProps & Props) => { render={(syntaxId: number) => { const syntax = syntaxes.find((s) => s.id === syntaxId); return syntax ? ( - + ) : null; }} /> @@ -228,7 +231,7 @@ export const ListsTable = (props: RouteComponentProps & Props) => { key="Languages" dataIndex={nameof("languageIds")} sorter={(a, b) => - arraySorter(a.languageIso6391s, b.languageIso6391s, languages) + arraySorter(a.languageIds, b.languageIds, languages) } width={129} className={styles.nogrow} @@ -239,8 +242,7 @@ export const ListsTable = (props: RouteComponentProps & Props) => { {l.name}  ( { visibleLists.filter( - (li) => - li.languageIso6391s && li.languageIso6391s.includes(l.id) + (li) => li.languageIds && li.languageIds.includes(l.id) ).length } ) @@ -249,9 +251,7 @@ export const ListsTable = (props: RouteComponentProps & Props) => { value: l.id.toString(), }))} onFilter={(value, record) => - record.languageIso6391s - ? record.languageIso6391s.includes(+value) - : false + record.languageIds ? record.languageIds.includes(+value) : false } render={(languageIds: number[]) => languageIds ? ( diff --git a/web/src/components/maintainerCloud/MaintainerCloud.tsx b/web/src/components/maintainerCloud/MaintainerCloud.tsx index 8974874da..155b92fe1 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.url ? ( + m.homeUrl ? ( { let actions = []; - if (props.maintainer.url) { + if (props.maintainer.homeUrl) { actions.push(