Skip to content

Commit

Permalink
🔨 cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
sophiamersmann committed Jan 29, 2025
1 parent 04683c5 commit 46f4507
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
6 changes: 1 addition & 5 deletions adminSiteClient/AdminApp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -340,11 +340,7 @@ export class AdminApp extends React.Component<{
/>
<Route
path="/dataInsights"
component={() => (
<GdocsStoreProvider>
<DataInsightIndexPage />
</GdocsStoreProvider>
)}
component={DataInsightIndexPage}
/>
<Route
exact
Expand Down
6 changes: 3 additions & 3 deletions adminSiteClient/DataInsightIndexPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ export function DataInsightIndexPage() {
dataInsight.published &&
dayjs(dataInsight.publishedAt).isBefore(dayjs())
)
default:
case "all":
return true
}
}
Expand Down Expand Up @@ -369,7 +369,7 @@ function DataInsightGallery({
<Flex wrap gap="large">
{dataInsightsWithPreviewImage.map((dataInsight, index) => (

Check warning on line 370 in adminSiteClient/DataInsightIndexPage.tsx

View workflow job for this annotation

GitHub Actions / eslint

'index' is defined but never used. Allowed unused args must match /^_/u

Check warning on line 370 in adminSiteClient/DataInsightIndexPage.tsx

View workflow job for this annotation

GitHub Actions / eslint

'index' is defined but never used. Allowed unused args must match /^_/u
<DataInsightCard
key={`${dataInsight.id}-${index}`}
key={dataInsight.id}
dataInsight={dataInsight}
/>
))}
Expand All @@ -391,7 +391,7 @@ function DataInsightCard({
)

return (
<Card key={dataInsight.id} cover={preview}>
<Card cover={preview}>
<a
href={makePreviewLink(dataInsight)}
target="_blank"
Expand Down
2 changes: 1 addition & 1 deletion adminSiteClient/gdocsValidation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ function validateGrapherUrl(
gdoc: OwidGdocDataInsightInterface,
errors: OwidGdocErrorMessage[]
) {
const grapherUrl = gdoc.content["grapher-url"]
const grapherUrl = gdoc.content["grapher-url"]?.trim()
if (grapherUrl) {
const validPrefixes = [
"https://ourworldindata.org/grapher/",
Expand Down

0 comments on commit 46f4507

Please sign in to comment.