Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

fix btn

kruzhambusef3b9a9fa1a5
diff --git a/src/pages/Project/View/Panels.tsx b/src/pages/Project/View/Panels.tsx
index bd6353e39..9e382aa3d 100644
--- a/src/pages/Project/View/Panels.tsx
+++ b/src/pages/Project/View/Panels.tsx
@@ -772,15 +772,16 @@ const Panel = ({
onClose={() => setModal(false)}
closeText={t('common.close')}
isOpened={modal}
+ customButtons={(
+ <button
+ type='button'
+ className='mt-3 w-full inline-flex justify-center rounded-md dark:border-none border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 dark:text-gray-50 dark:border-gray-600 dark:bg-gray-600 dark:hover:border-gray-600 dark:hover:bg-gray-700 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm'
+ >
+ reverse
+ </button>
+ )}
message={(
- <div className='h-72'>
- <Button
- onClick={() => {}}
- className='relative float-right px-2 py-1 text-sm dark:text-gray-50 dark:border-gray-800 dark:bg-gray-700 dark:hover:bg-gray-600'
- secondary
- >
- reverse
- </Button>
+ <div className='h-96'>
<SankeyChart />
</div>
)}
diff --git a/src/pages/Project/View/components/SankeyChart.tsx b/src/pages/Project/View/components/SankeyChart.tsx
index 318ddcc5e..23f9264ba 100644
--- a/src/pages/Project/View/components/SankeyChart.tsx
+++ b/src/pages/Project/View/components/SankeyChart.tsx
@@ -79,7 +79,7 @@ const SankeyChart = ({ data, disableLegend }: {
<ResponsiveSankey
data={dataTest}
margin={{
- top: 20, right: disableLegend ? 0 : 120, bottom: 20, left: 20,
+ top: 0, right: disableLegend ? 0 : 120, bottom: 0, left: 20,
}}
align='justify'
colors={{ scheme: 'category10' }}
@@ -138,4 +138,10 @@ const SankeyChart = ({ data, disableLegend }: {
/>
)
+SankeyChart.defaultProps = {
+ data: {},
+ disableLegend: false,
+ height: null,
+}
+
export default SankeyChart