Refactor CSS and modify data display layout
The commit includes modification to the CSS of the verify email component and changes how form data is displayed. The form data that was previously shown in a standard div is now presented in a table format for better readability. Also, it contains minor debug changes in verify_mail.tsx to handle invalid responses.
This commit is contained in:
parent
394fd6069e
commit
011fb9a282
|
|
@ -1,14 +1,14 @@
|
|||
.fields {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
max-width: 1020px;
|
||||
width: 80%
|
||||
}
|
||||
/*.fields {*/
|
||||
/* display: flex;*/
|
||||
/* flex-direction: column;*/
|
||||
/* align-items: flex-start;*/
|
||||
/* max-width: 1020px;*/
|
||||
/* width: 80%*/
|
||||
/*}*/
|
||||
|
||||
.field {
|
||||
margin-bottom: -10px
|
||||
}
|
||||
/*.field {*/
|
||||
/* margin-bottom: -10px*/
|
||||
/*}*/
|
||||
|
||||
.header {
|
||||
font-size: 30px;
|
||||
|
|
@ -23,6 +23,18 @@
|
|||
text-align: left;
|
||||
}
|
||||
|
||||
.value {
|
||||
|
||||
table {
|
||||
width: 50%;
|
||||
margin: 0 auto;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.form-data-row {
|
||||
border: 1px solid #ddd;
|
||||
}
|
||||
|
||||
.form-data-key,
|
||||
.form-data-value {
|
||||
border: 1px solid #ddd;
|
||||
padding: 10px;
|
||||
}
|
||||
|
|
@ -26,12 +26,16 @@ const ThankYou: FC = () => {
|
|||
</Helmet>
|
||||
<header className="header">Thank you for completing the form and verifying your email!<br></br>This is the data you entered:</header>
|
||||
<div className="fields">
|
||||
<table>
|
||||
<tbody>
|
||||
{Object.entries(formData).map(([key, value]) => (
|
||||
<div className="field" id={key}>
|
||||
<p className="key">{key}</p>
|
||||
<p className="value">{value}</p>
|
||||
</div>
|
||||
<tr className="form-data-row" id={key}>
|
||||
<td className="form-data-key">{key}</td>
|
||||
<td className="form-data-value">{value}</td>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -52,13 +52,14 @@ const VerifyMail: FC = () => {
|
|||
.then(response => {
|
||||
if (!response.ok) {
|
||||
//TODO fix error and make message here?
|
||||
response.json().then(result => console.log(result))
|
||||
console.log(response)
|
||||
throw new Error('Invalid code');
|
||||
}
|
||||
//TODO check if its json if not its just text we need to handle and put in a p tag
|
||||
return response.json()
|
||||
})
|
||||
.then((data: DynamicFormData) => {
|
||||
console.log(data);
|
||||
setFormData(data);
|
||||
})
|
||||
.catch(error => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user