@@ -8,6 +8,7 @@ import Fuse from "fuse.js";
8
8
import SpinnerLoader from "../components/SpinnerLoader" ;
9
9
import { IconContext } from "react-icons" ;
10
10
import "../styles/Projects.css" ;
11
+ import { PROJECTS_STARTED } from "../util/constants" ;
11
12
12
13
function Projects ( ) {
13
14
const [ projects , setProjects ] = useState <
@@ -49,39 +50,44 @@ function Projects() {
49
50
return (
50
51
< div className = "projects-container" >
51
52
< h1 className = "projects-title" > Projects</ h1 >
52
- < div className = "search-container" >
53
- < div className = "search-bar" >
54
- < input
55
- className = "search-input"
56
- type = "text"
57
- placeholder = "Search for projects by name or topic"
58
- onChange = { onQueryChangeHandler }
59
- value = { query }
60
- />
61
- { query !== "" && (
62
- < button onClick = { ( ) => setQuery ( "" ) } className = "search-cancel" >
63
- < IconContext . Provider value = { { size : "1.6rem" } } >
64
- < MdCancel />
65
- </ IconContext . Provider >
66
- </ button >
53
+ { PROJECTS_STARTED ? (
54
+ < >
55
+ < div className = "search-container" >
56
+ < div className = "search-bar" >
57
+ < input
58
+ className = "search-input"
59
+ type = "text"
60
+ placeholder = "Search for projects by name or topic"
61
+ onChange = { onQueryChangeHandler }
62
+ value = { query }
63
+ />
64
+ { query !== "" && (
65
+ < button onClick = { ( ) => setQuery ( "" ) } className = "search-cancel" >
66
+ < IconContext . Provider value = { { size : "1.6rem" } } >
67
+ < MdCancel />
68
+ </ IconContext . Provider >
69
+ </ button >
70
+ ) }
71
+ </ div >
72
+ </ div >
73
+ { error !== null ? (
74
+ < p className = "error-message" > { error } </ p >
75
+ ) : projects . length > 0 ? (
76
+ < div className = "projects-grid" >
77
+ { searchResults . map ( ( project , i ) => (
78
+ < ProjectCard
79
+ key = { i }
80
+ project = { project }
81
+ setQuery = { ( query ) => setQuery ( query ) }
82
+ />
83
+ ) ) }
84
+ </ div >
85
+ ) : (
86
+ < SpinnerLoader />
67
87
) }
68
- </ div >
69
- </ div >
70
-
71
- { error !== null ? (
72
- < p className = "error-message" > { error } </ p >
73
- ) : projects . length > 0 ? (
74
- < div className = "projects-grid" >
75
- { searchResults . map ( ( project , i ) => (
76
- < ProjectCard
77
- key = { i }
78
- project = { project }
79
- setQuery = { ( query ) => setQuery ( query ) }
80
- />
81
- ) ) }
82
- </ div >
88
+ </ >
83
89
) : (
84
- < SpinnerLoader / >
90
+ < h2 > Stay Tuned! </ h2 >
85
91
) }
86
92
</ div >
87
93
) ;
0 commit comments