added download url in authentication details, fixed blocked mods showing on landing page, fixed editing mod data not showing #59

Merged
freakoverse merged 3 commits from staging into master 2024-09-30 11:56:28 +00:00
Showing only changes of commit 3b2e899c14 - Show all commits

View File

@ -60,7 +60,7 @@ export const ModForm = ({ existingModData }: ModFormProps) => {
const [isPublishing, setIsPublishing] = useState(false)
const [gameOptions, setGameOptions] = useState<GameOption[]>([])
const [formState, setFormState] = useState<ModFormState>(
initializeFormState(existingModData)
initializeFormState()
)
const [formErrors, setFormErrors] = useState<FormErrors>({})
@ -70,6 +70,12 @@ export const ModForm = ({ existingModData }: ModFormProps) => {
}
}, [location.pathname]) // Only trigger when the pathname changes to submit-mod
useEffect(() => {
if (existingModData) {
setFormState(initializeFormState(existingModData))
}
}, [existingModData])
useEffect(() => {
const options = games.map((game) => ({
label: game['Game Name'],