fixed: nsfw button

This commit is contained in:
Damien Ostler 2024-06-03 21:23:08 -04:00
parent e6a81a3bdf
commit 234cc989f1
3 changed files with 6 additions and 5 deletions

View File

@ -108,7 +108,7 @@ function PageComponent() {
startingTags={[]} startingTags={[]}
placeholderTags={[ placeholderTags={[
{ value: "tags", label: "❗️ click here to add tags to search" } { value: "tags", label: "❗️ click here to add tags to search" }
]} nsfwButtonEnabled={true} searchChanged={(search) => { setSearchState(search) }} nsfwChanged={(nsfw) => { setNsfwState(nsfw) }} tagsChanged={(tags) => { setTagsState(tags) }} /> ]} nsfwButtonEnabled={false} searchChanged={(search) => { setSearchState(search) }} nsfwChanged={(nsfw) => { setNsfwState(nsfw) }} tagsChanged={(tags) => { setTagsState(tags) }} />
<a href="/gallery/admin/create" className="hover:scale-95 ml-2 p-2 shadow-lg h-10 text-center bg-success hover:bg-success-light text-white w-1/6 font-bold rounded flex items-center justify-center"> <a href="/gallery/admin/create" className="hover:scale-95 ml-2 p-2 shadow-lg h-10 text-center bg-success hover:bg-success-light text-white w-1/6 font-bold rounded flex items-center justify-center">
+ Gallery + Gallery

View File

@ -45,6 +45,7 @@ const Search = ({ gallerySelected }: SearchProps) => {
<section className="fixed flex items-center w-full p-8 pt-20 opacity-90 animate-in animate-once animate-duration-500"> <section className="fixed flex items-center w-full p-8 pt-20 opacity-90 animate-in animate-once animate-duration-500">
<div className="container mx-auto py-8"> <div className="container mx-auto py-8">
<SearchInput <SearchInput
startingTags={[]} startingTags={[]}
placeholderTags={[ placeholderTags={[
{ value: "neroshi", label: "🧑‍🎨 neroshi" }, { value: "neroshi", label: "🧑‍🎨 neroshi" },

View File

@ -114,7 +114,7 @@ const SearchInput = ({ tagsChanged, searchChanged, nsfwChanged, nsfwButtonEnable
) )
: ( : (
<> <>
<div className="absolute w-full top-0"> <div className="w-5/6 top-0">
<Select isMultiple isSearchable isClearable searchInputPlaceholder='Start typing to search tags...' <Select isMultiple isSearchable isClearable searchInputPlaceholder='Start typing to search tags...'
options={tagOptions} options={tagOptions}
placeholder="Select tags for your search" placeholder="Select tags for your search"
@ -155,10 +155,10 @@ const SearchInput = ({ tagsChanged, searchChanged, nsfwChanged, nsfwButtonEnable
)} )}
value={selectedTagsInput} value={selectedTagsInput}
primaryColor={"indigo"} /> primaryColor={"indigo"} />
</div>
{(nsfwButtonEnabled!=true) && ( </div>
<span className="flex items-center border-0 font-bold text-grey-100"> {(nsfwButtonEnabled) && (
<span className="w-1/6 border-0 font-bold text-grey-100">
<button <button
onClick={() => { setNsfw(!nsfw) }} onClick={() => { setNsfw(!nsfw) }}
type="button" type="button"