Skip to content
This repository was archived by the owner on May 4, 2023. It is now read-only.

Commit 398e97d

Browse files
feat: added languages to cookbook tables
1 parent 0e0e28f commit 398e97d

File tree

2 files changed

+16
-11
lines changed

2 files changed

+16
-11
lines changed

src/renderer/components/CookbookTable/CookbookTable.tsx

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import {
1515
Avatar,
1616
UsersIcon,
1717
CodeIcon,
18+
Logos,
1819
} from '@codiga/codiga-components';
1920

2021
import { getCookbookUrl, getGroupUrl } from 'renderer/utils/urlUtils';
@@ -105,17 +106,6 @@ export default function CookbookTable({ cookbooks, page }: CookbookTableProps) {
105106
</Flex>
106107
</Td>
107108
)}
108-
<Td>
109-
<Flex alignItems="center" gap="space_8">
110-
<CodeIcon />
111-
<Text size="xs" noOfLines={1}>
112-
{cookbook?.recipesCount}
113-
</Text>
114-
</Flex>
115-
</Td>
116-
117-
{/* FIXME - LANGUAGES */}
118-
119109
<Td>
120110
<Flex alignItems="center" gap="space_8">
121111
<Avatar
@@ -143,6 +133,18 @@ export default function CookbookTable({ cookbooks, page }: CookbookTableProps) {
143133
</Text>
144134
</Flex>
145135
</Td>
136+
<Td>
137+
<Flex alignItems="center" gap="space_8">
138+
<CodeIcon />
139+
<Text size="xs" noOfLines={1}>
140+
{cookbook?.recipesCount}
141+
</Text>
142+
</Flex>
143+
</Td>
144+
145+
<Td>
146+
<Logos values={cookbook?.languages || []} max={2} />
147+
</Td>
146148
</Tr>
147149
);
148150
})}

src/renderer/graphql/queries.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ export const GET_USER_COOKBOOKS = gql`
107107
}
108108
upvotes
109109
downvotes
110+
languages
110111
recipesCount(name: $name)
111112
}
112113
cookbooksCount: assistantCookbooksCount(name: $name)
@@ -200,6 +201,7 @@ export const GET_USER_SUBSCRIBED_COOKBOOKS = gql`
200201
}
201202
upvotes
202203
downvotes
204+
languages
203205
}
204206
isAnyCookbook: assistantCookbooksSubscribed(howmany: 1, skip: 0) {
205207
id
@@ -303,6 +305,7 @@ export const GET_SHARED_COOKBOOKS = gql`
303305
}
304306
upvotes
305307
downvotes
308+
languages
306309
}
307310
sharedCookbooksCount(name: $name, groupId: $groupId)
308311
}

0 commit comments

Comments
 (0)