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 error with userflow

Maksim Mrug203993611c9e
diff --git a/app/routes/project/view/components/UserFlow.tsx b/app/routes/project/view/components/UserFlow.tsx
index 8c5d080e1..52aaa2b3e 100644
--- a/app/routes/project/view/components/UserFlow.tsx
+++ b/app/routes/project/view/components/UserFlow.tsx
@@ -1,5 +1,5 @@
import React, { useEffect, useState, useMemo } from 'react'
-import { ResponsiveSankey } from '@nivo/sankey'
+// import { ResponsiveSankey } from '@nivo/sankey'
import { connect } from 'react-redux'
import { StateType, AppDispatch } from 'redux/store'
import UIActions from 'redux/reducers/ui'
@@ -133,50 +133,50 @@ const UserFlow = ({
)
}
- return (
- <ResponsiveSankey
- // @ts-ignore
- data={isReversed ? userFlowDescending : userFlowAscending}
- margin={{
- top: 0,
- // right: disableLegend ? 0 : 120,
- right: 0,
- bottom: 0,
- left: 20,
- }}
- align='justify'
- colors={{ scheme: 'nivo' }}
- nodeOpacity={1}
- nodeHoverOthersOpacity={0.35}
- nodeThickness={18}
- nodeSpacing={24}
- nodeBorderWidth={0}
- nodeBorderColor={{
- from: 'color',
- modifiers: [
- [
- 'darker',
- 0.8,
- ],
- ],
- }}
- nodeBorderRadius={3}
- linkOpacity={0.5}
- linkHoverOthersOpacity={0.1}
- linkContract={3}
- enableLinkGradient
- labelPosition='outside'
- labelOrientation='vertical'
- labelPadding={16}
- labelTextColor={{
- from: 'color',
- modifiers: [
- [
- 'darker',
- 1,
- ],
- ],
- }}
+ return null
+ // <ResponsiveSankey
+ // // @ts-ignore
+ // data={isReversed ? userFlowDescending : userFlowAscending}
+ // margin={{
+ // top: 0,
+ // // right: disableLegend ? 0 : 120,
+ // right: 0,
+ // bottom: 0,
+ // left: 20,
+ // }}
+ // align='justify'
+ // colors={{ scheme: 'nivo' }}
+ // nodeOpacity={1}
+ // nodeHoverOthersOpacity={0.35}
+ // nodeThickness={18}
+ // nodeSpacing={24}
+ // nodeBorderWidth={0}
+ // nodeBorderColor={{
+ // from: 'color',
+ // modifiers: [
+ // [
+ // 'darker',
+ // 0.8,
+ // ],
+ // ],
+ // }}
+ // nodeBorderRadius={3}
+ // linkOpacity={0.5}
+ // linkHoverOthersOpacity={0.1}
+ // linkContract={3}
+ // enableLinkGradient
+ // labelPosition='outside'
+ // labelOrientation='vertical'
+ // labelPadding={16}
+ // labelTextColor={{
+ // from: 'color',
+ // modifiers: [
+ // [
+ // 'darker',
+ // 1,
+ // ],
+ // ],
+ // }}
// legends={!disableLegend ? [
// {
// anchor: 'bottom-right',
@@ -198,8 +198,8 @@ const UserFlow = ({
// ],
// },
// ] : []}
- />
- )
+ // />
+ // )
}
UserFlow.defaultProps = {
diff --git a/app/styles/Flatpicker.css b/app/styles/Flatpicker.css
new file mode 100644
index 000000000..9ab1625d1
--- /dev/null
+++ b/app/styles/Flatpicker.css
@@ -0,0 +1,60 @@
+.flatpicker-custom .flatpickr-calendar.static {
+ position: absolute !important;
+}
+
+.flatpicker-custom .flatpickr-calendar.static.open {
+ left: -310px;
+ top: 30px;
+}
+
+.flatpicker-custom .flatpickr-day.selected,
+.flatpicker-custom .flatpickr-day.startRange,
+.flatpicker-custom .flatpickr-day.endRange,
+.flatpicker-custom .flatpickr-day.selected.inRange,
+.flatpicker-custom .flatpickr-day.startRange.inRange,
+.flatpicker-custom .flatpickr-day.endRange.inRange,
+.flatpicker-custom .flatpickr-day.selected:focus,
+.flatpicker-custom .flatpickr-day.startRange:focus,
+.flatpicker-custom .flatpickr-day.endRange:focus,
+.flatpicker-custom .flatpickr-day.selected:hover,
+.flatpicker-custom .flatpickr-day.startRange:hover,
+.flatpicker-custom .flatpickr-day.endRange:hover,
+.flatpicker-custom .flatpickr-day.selected.prevMonthDay,
+.flatpicker-custom .flatpickr-day.startRange.prevMonthDay,
+.flatpicker-custom .flatpickr-day.endRange.prevMonthDay,
+.flatpicker-custom .flatpickr-day.selected.nextMonthDay,
+.flatpicker-custom .flatpickr-day.startRange.nextMonthDay,
+.flatpicker-custom .flatpickr-day.endRange.nextMonthDay {
+ background: #1d4ed8;
+ -webkit-box-shadow: none;
+ box-shadow: none;
+ color: #fff;
+ border-color: #1d4ed8;
+}
+
+/* if you need other color on dark theme */
+
+.dark .flatpicker-custom .flatpickr-day.selected,
+.dark .flatpicker-custom .flatpickr-day.startRange,
+.dark .flatpicker-custom .flatpickr-day.endRange,
+.dark .flatpicker-custom .flatpickr-day.selected.inRange,
+.dark .flatpicker-custom .flatpickr-day.startRange.inRange,
+.dark .flatpicker-custom .flatpickr-day.endRange.inRange,
+.dark .flatpicker-custom .flatpickr-day.selected:focus,
+.dark .flatpicker-custom .flatpickr-day.startRange:focus,
+.dark .flatpicker-custom .flatpickr-day.endRange:focus,
+.dark .flatpicker-custom .flatpickr-day.selected:hover,
+.dark .flatpicker-custom .flatpickr-day.startRange:hover,
+.dark .flatpicker-custom .flatpickr-day.endRange:hover,
+.dark .flatpicker-custom .flatpickr-day.selected.prevMonthDay,
+.dark .flatpicker-custom .flatpickr-day.startRange.prevMonthDay,
+.dark .flatpicker-custom .flatpickr-day.endRange.prevMonthDay,
+.dark .flatpicker-custom .flatpickr-day.selected.nextMonthDay,
+.dark .flatpicker-custom .flatpickr-day.startRange.nextMonthDay,
+.dark .flatpicker-custom .flatpickr-day.endRange.nextMonthDay {
+ background: #4f46e5;
+ -webkit-box-shadow: none;
+ box-shadow: none;
+ color: #fff;
+ border-color: #4f46e5;
+}
\ No newline at end of file
diff --git a/app/styles/tailwind.css b/app/styles/tailwind.css
new file mode 100644
index 000000000..bd6213e1d
--- /dev/null
+++ b/app/styles/tailwind.css
@@ -0,0 +1,3 @@
+@tailwind base;
+@tailwind components;
+@tailwind utilities;
\ No newline at end of file