Skip to content

Commit

Permalink
✨ explorer-tiles code review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ikesau committed Feb 15, 2024
1 parent 38875ca commit 08806e7
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions db/db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ export const getPublishedExplorersBySlug = async (
`-- sql
SELECT
slug,
JSON_UNQUOTE(JSON_EXTRACT(config, "$.explorerTitle")) as title,
JSON_UNQUOTE(JSON_EXTRACT(config, "$.explorerSubtitle")) as subtitle
config->>"$.explorerTitle" as title,
config->>"$.explorerSubtitle" as subtitle
FROM
explorers
WHERE
Expand Down
2 changes: 1 addition & 1 deletion db/model/Gdoc/GdocBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ export class GdocBase extends BaseEntity implements OwidGdocBaseInterface {
)

const linkedExplorerCharts = await Promise.all(
[...this.linkedChartSlugs.explorer.values()].map((originalSlug) => {
this.linkedChartSlugs.explorer.map((originalSlug) => {
const explorer = publishedExplorersBySlug[originalSlug]
if (!explorer) return
const linkedChart: LinkedChart = {
Expand Down
2 changes: 1 addition & 1 deletion db/model/Gdoc/rawToEnriched.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1817,7 +1817,7 @@ function parseExplorerTiles(
if (!raw.value.subtitle)
return createError({ message: "Explorer tiles missing subtitle" })

if (!raw.value.explorers || !raw.value.explorers.length)
if (!raw.value.explorers?.length)
return createError({ message: "Explorer tiles missing explorers" })

const parsedExplorerUrls: { url: string }[] = []
Expand Down
Binary file modified public/explorer-thumbnail.webp
Binary file not shown.
2 changes: 1 addition & 1 deletion site/gdocs/components/ExplorerTiles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
padding: 16px;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
align-content: space-between;
}
.explorer-tile__icon {
background-color: $blue-55;
Expand Down

0 comments on commit 08806e7

Please sign in to comment.