added download url in authentication details, fixed blocked mods showing on landing page, fixed editing mod data not showing #59
@ -60,7 +60,7 @@ export const ModForm = ({ existingModData }: ModFormProps) => {
|
|||||||
const [isPublishing, setIsPublishing] = useState(false)
|
const [isPublishing, setIsPublishing] = useState(false)
|
||||||
const [gameOptions, setGameOptions] = useState<GameOption[]>([])
|
const [gameOptions, setGameOptions] = useState<GameOption[]>([])
|
||||||
const [formState, setFormState] = useState<ModFormState>(
|
const [formState, setFormState] = useState<ModFormState>(
|
||||||
initializeFormState(existingModData)
|
initializeFormState()
|
||||||
)
|
)
|
||||||
const [formErrors, setFormErrors] = useState<FormErrors>({})
|
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
|
}, [location.pathname]) // Only trigger when the pathname changes to submit-mod
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (existingModData) {
|
||||||
|
setFormState(initializeFormState(existingModData))
|
||||||
|
}
|
||||||
|
}, [existingModData])
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const options = games.map((game) => ({
|
const options = games.map((game) => ({
|
||||||
label: game['Game Name'],
|
label: game['Game Name'],
|
||||||
|
Loading…
Reference in New Issue
Block a user