mirror of
https://github.com/mvvasilev/findtheti.me.git
synced 2025-04-18 21:19:52 +03:00
Limit input size for title and description, and make title wrap
This commit is contained in:
parent
446103e952
commit
39ed7d8932
2 changed files with 11 additions and 1 deletions
|
@ -199,7 +199,7 @@ export default function ExistingEventPage() {
|
|||
<Typography>You've been invited to...</Typography>
|
||||
</Grid>
|
||||
<Grid xs={12}>
|
||||
<Typography variant="h4">{ event.name }</Typography>
|
||||
<Typography variant="h4" sx={{ wordBreak: "break-word" }} noWrap={false}>{ event.name }</Typography>
|
||||
</Grid>
|
||||
{
|
||||
(event.description !== null) &&
|
||||
|
|
|
@ -89,6 +89,11 @@ export default function NewEventPage() {
|
|||
sx={{ width: "100%" }}
|
||||
value={event.name}
|
||||
onChange={(e) => {
|
||||
if (e.target.value.length > 90) {
|
||||
e.preventDefault();
|
||||
return;
|
||||
}
|
||||
|
||||
event.name = e.target.value;
|
||||
setEvent({...event});
|
||||
}}
|
||||
|
@ -100,6 +105,11 @@ export default function NewEventPage() {
|
|||
sx={{ width: "100%" }}
|
||||
value={event.description}
|
||||
onChange={(e) => {
|
||||
if (e.target.value.length > 250) {
|
||||
e.preventDefault();
|
||||
return;
|
||||
}
|
||||
|
||||
event.description = e.target.value;
|
||||
setEvent({...event});
|
||||
}}
|
||||
|
|
Loading…
Add table
Reference in a new issue