feat: disable submit until valid
This commit is contained in:
@@ -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>
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user