diff --git a/components/BinaryCode.tsx b/components/BinaryCode.tsx new file mode 100644 index 00000000..94d1a22b --- /dev/null +++ b/components/BinaryCode.tsx @@ -0,0 +1,14 @@ +export const BinaryCode = () => { + return ( +

+ 01111001010111100101 +
110111010110111100101 +
1101110101101111001{" "} +
+
             10111100101

+
+ ); +}; diff --git a/components/GeneralFilter.tsx b/components/GeneralFilter.tsx new file mode 100644 index 00000000..adbb6fd3 --- /dev/null +++ b/components/GeneralFilter.tsx @@ -0,0 +1,10 @@ +type GeneralFilterProps = { + filter: string | number | readonly string[] | undefined; + setFilter: (filter: string | number | readonly string[] | undefined) => void; +}; + +export const GeneralFilter = ({ filter, setFilter }: GeneralFilterProps) => { + return ( + setFilter(e.target.value)} placeholder="Search Repositories" className="flex-1 mx-2 border rounded-sm p-2 mb-4" /> + ); +}; diff --git a/components/HappyCommitsInfo.tsx b/components/HappyCommitsInfo.tsx index 5fc2c119..bbabec73 100644 --- a/components/HappyCommitsInfo.tsx +++ b/components/HappyCommitsInfo.tsx @@ -1,6 +1,6 @@ export const HappyCommitsInfo = () => { return ( -
+
{ return ( @@ -7,11 +8,13 @@ export const HeroContainer = () => {
+
); diff --git a/components/LanguageFilter.tsx b/components/LanguageFilter.tsx new file mode 100644 index 00000000..0a00d208 --- /dev/null +++ b/components/LanguageFilter.tsx @@ -0,0 +1,15 @@ +import Select from "react-select"; + +type LanguageFilterProps = { + setSelectedLanguages: (languages: string[]) => void; + languageOptions: { value: string; label: string }[]; +}; + +export const LanguageFilter = ({ setSelectedLanguages, languageOptions }: LanguageFilterProps) => { + return ( + <> + + setFilter(e.target.value)} - placeholder="Search Repositories" - className="flex-1 mx-2 border rounded-sm p-2 mb-4" - /> - - option.label} - getOptionValue={(option) => option.value ?? ""} - onChange={(selectedOptions) => { - setSelectedTopics(selectedOptions.map((option) => option.value ?? "")); - }} - /> + + +
- setItems(items + itemsPerScroll)} - hasMore={items < filteredRepositories.length} - loader={} - > - {filteredRepositories.slice(0, items).map((repository) => { - const key = `${repository.id}_${new Date().getTime()}_${Math.random()}`; - return ; - })} + }> + {filteredRepositories.slice(0, items).map((repository) => )}
diff --git a/components/SDGFilter.tsx b/components/SDGFilter.tsx new file mode 100644 index 00000000..064006c9 --- /dev/null +++ b/components/SDGFilter.tsx @@ -0,0 +1,24 @@ +import Select from "react-select"; + +type SDGFilterProps = { + setSelectedTopics: (topics: string[]) => void; + topicOptions: { value: string; label: string }[]; +}; + +export const SDGFilter = ({ setSelectedTopics, topicOptions }: SDGFilterProps) => { + return ( + <> + +