47 lines
1.3 KiB
JavaScript
47 lines
1.3 KiB
JavaScript
import React, { useState, useEffect, useRef } from 'react';
|
|
import { __ } from '@wordpress/i18n';
|
|
import { useParams, useNavigate } from 'react-router-dom';
|
|
|
|
// components
|
|
import { Button } from 'primereact/button';
|
|
|
|
const BandoForms = () => {
|
|
const { id } = useParams();
|
|
const navigate = useNavigate();
|
|
//const [data, setData] = useState({});
|
|
//const [isLoading, setIsLoading] = useState(true);
|
|
|
|
const doCreateNewForm = () => {
|
|
navigate('/bandi/11/forms/new');
|
|
}
|
|
|
|
useEffect(() => {
|
|
const parsed = parseInt(id)
|
|
const bandoId = !isNaN(parsed) ? parsed : 0;
|
|
|
|
// TODO
|
|
}, [id]);
|
|
|
|
return (
|
|
<div className="appPage">
|
|
<div className="appPage__pageHeader">
|
|
<h1>{__('Crea o modifica form per il Bando', 'gepafin')}</h1>
|
|
<p>
|
|
{__('Scegli come vuoi procedere:', 'gepafin')}
|
|
</p>
|
|
</div>
|
|
|
|
<div className="appPage__spacer"></div>
|
|
|
|
<div className="appPageSection">
|
|
<Button
|
|
type="button"
|
|
onClick={doCreateNewForm}
|
|
label={__('Crea/modifica form', 'gepafin')}/>
|
|
</div>
|
|
</div>
|
|
)
|
|
|
|
}
|
|
|
|
export default BandoForms; |