diff --git a/app/[slug]/dashboard/tables/page.tsx b/app/[slug]/dashboard/tables/page.tsx index 3f55aa0..8fd4a81 100644 --- a/app/[slug]/dashboard/tables/page.tsx +++ b/app/[slug]/dashboard/tables/page.tsx @@ -7,20 +7,33 @@ import { TableSimulation, TableSimulationSerializer } from '@/app/lib/tableSimul import Arrangement from '@/app/ui/arrangements/arrangement'; import ArrangementsTable from '@/app/ui/arrangements/arrangements-table'; import { classNames } from '@/app/ui/components/button'; -import { useState } from 'react'; +import { Toast } from 'primereact/toast'; +import React, { useRef, useState } from 'react'; export default function Page() { + const toast = useRef(null); + + const show = () => { + toast.current?.show({ + severity: 'success', + summary: 'Simulation created', + detail: 'Table distributions will be calculated shortly, please come back in some minutes' + }); + }; + const [currentArrangement, setCurrentArrangement] = useState(null); function createSimulation() { const api = new AbstractApi(); const serializer = new TableSimulationSerializer(); - api.create(serializer, new TableSimulation(), () => {}); + api.create(serializer, new TableSimulation(), show); } - + return ( <> +
+