mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-30 19:52:20 +01:00
(ui) Add link to agenda
This commit is contained in:
parent
49a06a9176
commit
4f46e62b87
@ -22,11 +22,6 @@ interface TrainingsProps {
|
||||
export const Trainings: React.FC<TrainingsProps> = () => {
|
||||
const { t } = useTranslation('admin');
|
||||
|
||||
/** Goto new training page */
|
||||
const newTraining = (): void => {
|
||||
window.location.href = '/#!/admin/trainings/new';
|
||||
};
|
||||
|
||||
// Styles the React-select component
|
||||
const customStyles = {
|
||||
control: base => ({
|
||||
@ -54,13 +49,22 @@ export const Trainings: React.FC<TrainingsProps> = () => {
|
||||
console.log(option);
|
||||
};
|
||||
|
||||
/** Link to calendar page */
|
||||
const toCalendar = (): void => {
|
||||
window.location.href = '/#!/admin/calendar';
|
||||
};
|
||||
|
||||
/** Link to new training page */
|
||||
const newTraining = (): void => {
|
||||
window.location.href = '/#!/admin/trainings/new';
|
||||
};
|
||||
|
||||
return (
|
||||
<div className='trainings'>
|
||||
<header>
|
||||
<h2>{t('app.admin.trainings.all_trainings')}</h2>
|
||||
<div className='grpBtn'>
|
||||
{/* lien vers l'agenda */}
|
||||
<FabButton><CalendarBlank size={20} /></FabButton>
|
||||
<FabButton onClick={toCalendar}><CalendarBlank size={20} /></FabButton>
|
||||
<FabButton className="main-action-btn" onClick={newTraining}>{t('app.admin.trainings.add_a_new_training')}</FabButton>
|
||||
</div>
|
||||
</header>
|
||||
|
Loading…
x
Reference in New Issue
Block a user