Skip to content

Commit 519ab41

Browse files
committed
add threshold
Only show vocabs if number of concept schemes is greater than 4
1 parent b214634 commit 519ab41

File tree

1 file changed

+17
-15
lines changed

1 file changed

+17
-15
lines changed

src/pages/index.js

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -78,21 +78,23 @@ const IndexPage = ({ location }) => {
7878
<SEO title="Concept Schemes" keywords={["conceptSchemes"]} />
7979

8080
<div className="centerPage block">
81-
<div style={{ marginBottom: "20px" }}>
82-
<input
83-
type="text"
84-
placeholder="Search concept schemes..."
85-
value={searchTerm}
86-
onChange={(e) => setSearchTerm(e.target.value)}
87-
style={{
88-
width: "100%",
89-
padding: "10px",
90-
fontSize: "16px",
91-
border: "1px solid #ccc",
92-
borderRadius: "4px",
93-
}}
94-
/>
95-
</div>
81+
{conceptSchemes.length > 4 && (
82+
<div style={{ marginBottom: "20px" }}>
83+
<input
84+
type="text"
85+
placeholder="Search concept schemes..."
86+
value={searchTerm}
87+
onChange={(e) => setSearchTerm(e.target.value)}
88+
style={{
89+
width: "100%",
90+
padding: "10px",
91+
fontSize: "16px",
92+
border: "1px solid #ccc",
93+
borderRadius: "4px",
94+
}}
95+
/>
96+
</div>
97+
)}
9698
<ul>
9799
{conceptSchemes
98100
.filter((conceptScheme) => {

0 commit comments

Comments
 (0)