SearchRoot.tsx 619 Bytes
Newer Older
David Haynes's avatar
David Haynes committed
1
import * as React from 'react';
David Haynes's avatar
David Haynes committed
2
import SearchBar from '../components/SearchBar';
3
import CourseSection from '../util/CourseSection';
David Haynes's avatar
David Haynes committed
4
5

interface SearchRootProps {
David Haynes's avatar
David Haynes committed
6
    searchResults: CourseSection[];
David Haynes's avatar
David Haynes committed
7
8
    searchCourseSections: (crn: string) => void;
    addCourseSection: (courseSectionToAdd: CourseSection) => void;
David Haynes's avatar
David Haynes committed
9
10
}

David Haynes's avatar
David Haynes committed
11
const SearchRoot = ({ searchResults, searchCourseSections, addCourseSection }: SearchRootProps) => (
David Haynes's avatar
David Haynes committed
12
    <div>
David Haynes's avatar
David Haynes committed
13
        <SearchBar onSearch={searchCourseSections} />
14
        {/* <SectionList courses={searchResults} selectCourseCallback={addCourseSection} /> */}
David Haynes's avatar
David Haynes committed
15
16
17
18
    </div>
);

export default SearchRoot;