Skip to content

Commit

Permalink
chore: fix linter warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
dmijatovic committed Sep 8, 2023
1 parent 23ad135 commit 29cfb7d
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 22 deletions.
25 changes: 15 additions & 10 deletions frontend/components/home/imperial/KeywordBox.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// SPDX-FileCopyrightText: 2023 Dusan Mijatovic (Netherlands eScience Center)
// SPDX-FileCopyrightText: 2023 Netherlands eScience Center
//
// SPDX-License-Identifier: Apache-2.0

import Link from 'next/link'

import {ssrProjectsUrl} from '~/utils/postgrestUrl'
Expand All @@ -7,14 +12,14 @@ type KeywordBoxProps = {
}

export default function KeywordBox({label}: KeywordBoxProps) {
const url = ssrProjectsUrl({keywords: [label]})
return (
<div className="bg-secondary text-primary-content p-2 text-center rounded-md">
<div className="text-lg">
<Link href={url}>
{label}
</Link>
</div>
</div>
)
const url = ssrProjectsUrl({keywords: [label]})
return (
<div className="bg-secondary text-primary-content p-2 text-center rounded-md">
<div className="text-lg">
<Link href={url}>
{label}
</Link>
</div>
</div>
)
}
29 changes: 17 additions & 12 deletions frontend/components/home/imperial/Keywords.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
// SPDX-FileCopyrightText: 2023 Dusan Mijatovic (Netherlands eScience Center)
// SPDX-FileCopyrightText: 2023 Netherlands eScience Center
//
// SPDX-License-Identifier: Apache-2.0

import KeywordBox from './KeywordBox'

type KeywordsProps = {
Expand All @@ -9,17 +14,17 @@ type KeywordsObject = {
}

export default function Keywords({keywords}: KeywordsProps) {
const keywordButtons = keywords.map((keyword: KeywordsObject, index: number) => {
return <KeywordBox key={index} label={keyword.keyword} />
})
return (
<div className="max-w-screen-xl mx-auto">
<div className="text-2xl ml-10 mt-14">
const keywordButtons = keywords.map((keyword: KeywordsObject, index: number) => {
return <KeywordBox key={index} label={keyword.keyword} />
})
return (
<div className="max-w-screen-xl mx-auto">
<div className="text-2xl ml-10 mt-14">
Popular Keywords
</div>
<div className="flex flex-wrap gap-10 md:gap-3 p-5 md:p-10 ">
{keywordButtons}
</div>
</div>
)
</div>
<div className="flex flex-wrap gap-10 md:gap-3 p-5 md:p-10 ">
{keywordButtons}
</div>
</div>
)
}

0 comments on commit 29cfb7d

Please sign in to comment.