Skip to content
This repository has been archived by the owner on Dec 19, 2024. It is now read-only.

Commit

Permalink
chore: just ts things
Browse files Browse the repository at this point in the history
Co-Authored-By: Galen Winsor <[email protected]>
  • Loading branch information
hetd54 and galenwinsor committed Jul 1, 2024
1 parent c6a9e32 commit 9842f94
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/components/Publications.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,15 @@ interface PubProps {

interface PubObject {
data: {
classification: string
classification: Classification
citation: string
image?: string
url?: string
pdf?: string
}
}

interface iOption {
label: string
value: string
}

type Classification = "Book" | "Article" | "Dissertation" | "Chapter"
const PublicationSection: React.FC<PubProps> = ({ publications }) => {
const classificationOptions = [
{ value: "Book", label: "Books" },
Expand All @@ -30,7 +26,7 @@ const PublicationSection: React.FC<PubProps> = ({ publications }) => {
},
{ value: "Dissertation", label: "Dissertations" },
{ value: "Chapter", label: "Chapters" },
]
] as const

const [searchInput, setSearchInput] = useState("")
const [classificationFilter, setClassificationFilter] = useState(classificationOptions)
Expand Down Expand Up @@ -79,7 +75,7 @@ const PublicationSection: React.FC<PubProps> = ({ publications }) => {
paddingRight: "2rem",
}),
}}
onChange={(option) => setClassificationFilter(option as Array<iOption>)}
onChange={(option) => setClassificationFilter(option)}
/>
</div>
</section>
Expand Down

0 comments on commit 9842f94

Please sign in to comment.