From 894fb58c2997573f13507f7559e25785b91824b7 Mon Sep 17 00:00:00 2001 From: Damien Ostler Date: Sun, 2 Jun 2024 03:51:53 -0400 Subject: [PATCH] fix: create page --- app/gallery/admin/create/page.tsx | 3 +++ app/gallery/admin/page.tsx | 3 +++ app/gallery/admin/view/page.tsx | 5 ++++- components/neroshitron/search.tsx | 5 ++++- components/neroshitron/search_input.tsx | 8 +++----- 5 files changed, 17 insertions(+), 7 deletions(-) diff --git a/app/gallery/admin/create/page.tsx b/app/gallery/admin/create/page.tsx index e0ae082..35f876d 100644 --- a/app/gallery/admin/create/page.tsx +++ b/app/gallery/admin/create/page.tsx @@ -60,6 +60,9 @@ function PageComponent() {
{}} nsfwChanged={(nsfw) => {}} diff --git a/app/gallery/admin/page.tsx b/app/gallery/admin/page.tsx index 9b9ab32..c9a9f46 100644 --- a/app/gallery/admin/page.tsx +++ b/app/gallery/admin/page.tsx @@ -60,6 +60,9 @@ function PageComponent() {
{}} nsfwChanged={(nsfw) => {}} diff --git a/app/gallery/admin/view/page.tsx b/app/gallery/admin/view/page.tsx index f37b398..c9a9f46 100644 --- a/app/gallery/admin/view/page.tsx +++ b/app/gallery/admin/view/page.tsx @@ -58,8 +58,11 @@ function PageComponent() {
-
+
{}} nsfwChanged={(nsfw) => {}} diff --git a/components/neroshitron/search.tsx b/components/neroshitron/search.tsx index 8bdadc3..846c245 100644 --- a/components/neroshitron/search.tsx +++ b/components/neroshitron/search.tsx @@ -44,7 +44,10 @@ const Search = ({ gallerySelected }: SearchProps) => { { setGallery(gallery) }} key={search + "-" + tags.length + "-" + nsfw} search={search} nsfw={nsfw} tags={tags} />
- { setSearch(search) }} nsfwChanged={(nsfw) => { setNsfw(nsfw) }} tagsChanged={(tags) => { setTags(tags); }} /> + { setSearch(search) }} nsfwChanged={(nsfw) => { setNsfw(nsfw) }} tagsChanged={(tags) => { setTags(tags); }} />
diff --git a/components/neroshitron/search_input.tsx b/components/neroshitron/search_input.tsx index cb63fc1..2718e9d 100644 --- a/components/neroshitron/search_input.tsx +++ b/components/neroshitron/search_input.tsx @@ -10,17 +10,15 @@ interface SearchInputProps { searchChanged: (search: string) => void; nsfwChanged: (nsfw: boolean) => void; nsfwButtonEnabled: boolean | null; + placeholderTags: Option[]; } -const SearchInput = ({ tagsChanged, searchChanged, nsfwChanged, nsfwButtonEnabled }: SearchInputProps) => { +const SearchInput = ({ tagsChanged, searchChanged, nsfwChanged, nsfwButtonEnabled, placeholderTags }: SearchInputProps) => { const [tagSearch, setTagSearch] = useState(''); const [nsfw, setNsfw] = useState(false); const [selectedTags, setSelectedTags] = useState([]); - const [selectedTagsInput, setSelectedTagsInput] = useState([ - { value: "neroshi", label: "🧑‍🎨 neroshi" }, - { value: "neroshi", label: "❗️ click here for tags!" }, - ]); + const [selectedTagsInput, setSelectedTagsInput] = useState(placeholderTags); const [selectingTags, setSelectingTags] = useState(false); const tagSelectorRef = React.useRef(null); const [tags, setTags] = useState([]);