-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #446 from bettersg/336-add-tag-for-generated-image
336 add tag for generated image
- Loading branch information
Showing
20 changed files
with
2,721 additions
and
439 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,14 +30,13 @@ RUN mkdir $NVM_DIR && \ | |
bash $NVM_DIR/nvm.sh ${NODE_VERSION} | ||
|
||
# Install firebase-tools and emulators \ | ||
RUN npm i -g firebase-tools@13.3.0 && \ | ||
RUN npm i -g firebase-tools && \ | ||
firebase setup:emulators:database && \ | ||
firebase setup:emulators:firestore && \ | ||
firebase setup:emulators:pubsub && \ | ||
firebase setup:emulators:storage && \ | ||
firebase setup:emulators:ui && \ | ||
firebase experiments:enable webframeworks | ||
#note: Query breaks in [email protected] with error 500 | ||
|
||
|
||
# Preserve firebase emulators cache | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import { Typography } from "@material-tailwind/react"; | ||
import { MultiValue } from "react-select"; | ||
import Select from "react-select"; | ||
|
||
const options = [ | ||
{ value: "generated", label: "🤖 AI Generated" }, | ||
{ value: "incorrect", label: "❌ Incorrect" }, | ||
]; | ||
|
||
interface VoteTagsProps { | ||
tags: string[]; | ||
onSelectTag: (tag: string[]) => void; | ||
} | ||
|
||
const VoteTags: React.FC<VoteTagsProps> = ({ tags, onSelectTag }) => { | ||
const selectedOptions = tags | ||
.map((tag) => options.find((option) => option.value === tag)) | ||
.filter( | ||
(option): option is { value: string; label: string } => | ||
option !== undefined | ||
); | ||
|
||
const handleSelectionTag = ( | ||
tagOption: MultiValue<{ value: string; label: string }> | null | ||
) => { | ||
const newTags = tagOption ? tagOption.map((tag) => tag.value) : []; | ||
onSelectTag(newTags); | ||
}; | ||
|
||
return ( | ||
<div className="grid grid-flow-row gap-y-4 items-center"> | ||
<Typography variant="h4" className="text-primary-color3 dark:text-white"> | ||
Select tags: | ||
</Typography> | ||
<Select | ||
className="mb-3" | ||
value={selectedOptions} | ||
onChange={handleSelectionTag} | ||
options={options} | ||
isMulti | ||
/> | ||
</div> | ||
); | ||
}; | ||
|
||
export default VoteTags; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.