feat: disable submit until valid

This commit is contained in:
2025-06-05 14:48:28 +01:00
parent a03a80a186
commit a180e49466
2 changed files with 13 additions and 1 deletions

View File

@@ -27,4 +27,8 @@
button:focus { button:focus {
outline: 2px solid #007bff; outline: 2px solid #007bff;
} }
button:disabled {
background: linear-gradient(-18deg, #66697b, #4e4e5e);
cursor: not-allowed;
}
</style> </style>

View File

@@ -95,7 +95,15 @@
/> />
<div class="submit"> <div class="submit">
<Button type="submit">Share this study space!</Button> <Button
type="submit"
disabled={(spaceImg?.length || 0) === 0 ||
!studySpaceData.location ||
!studySpaceData.description ||
!studySpaceData.building_location}
>
Share this study space!
</Button>
</div> </div>
</form> </form>