-
-
- {currentEvent.name}
-
- {currentEvent.function}
-
- {currentEvent.message}
-
- )
- }
- isDisplayed={currentEvent != null}
- content={
- currentEvent && {this.renderPopupContent(currentEvent)}
- }
- onClose={this.closeModal.bind(this)}
- />
-
-
-
- Events
-
-
-
-
-
-
- Integrations
-
- {' and '}
-
- Events
-
- {
- ' make debugging easier. Sync your backend logs and custom events with session replay.'
- }
-
-
-
- >
- ) : null
- }
- size="small"
- show={filteredStackEvents.length === 0}
- >
-
- {filteredStackEvents.map((userEvent, index) => (
- jump(userEvent.time)}
- />
- // lastIndex}
- // // selected={lastIndex === index}
- // userEvent={userEvent}
- // onJump={() => jump(userEvent.time)}
- // />
- ))}
-
-
-
-
- >
- );
- }
-}
diff --git a/frontend/app/components/hocs/dnd.js b/frontend/app/components/hocs/dnd.js
deleted file mode 100644
index 3e4f42e8e..000000000
--- a/frontend/app/components/hocs/dnd.js
+++ /dev/null
@@ -1,62 +0,0 @@
-import { HTML5Backend } from 'react-dnd-html5-backend';
-import { findDOMNode } from 'react-dom';
-import { DragSource, DropTarget, DndContext } from 'react-dnd';
-
-const cardSource = {
- beginDrag(props) {
- return {
- id: props.key,
- index: props.index,
- prevIndex: props.index,
- };
- },
-};
-
-const cardTarget = {
- // eslint-disable-next-line complexity
- hover(props, monitor, component) {
- const dragIndex = monitor.getItem().index;
- const hoverIndex = props.index;
-
- if (dragIndex === hoverIndex) {
- return;
- }
- /* eslint-disable react/no-find-dom-node */
- const hoverBoundingRect = findDOMNode(component).getBoundingClientRect();
- const hoverMiddleY = (hoverBoundingRect.bottom - hoverBoundingRect.top) / 2;
- const clientOffset = monitor.getClientOffset();
- const hoverClientY = clientOffset.y - hoverBoundingRect.top;
-
- // Dragging downwards
- if (dragIndex < hoverIndex && hoverClientY < hoverMiddleY) {
- return;
- }
-
- // Dragging upwards
- if (dragIndex > hoverIndex && hoverClientY > hoverMiddleY) {
- return;
- }
-
- props.onDNDMove(dragIndex, hoverIndex);
- monitor.getItem().index = hoverIndex;
- },
-
- drop(props, monitor) {
- const dragIndex = monitor.getItem().prevIndex;
- const dropIndex = props.index;
- if (props.onDNDDrop) {
- props.onDNDDrop(dragIndex, dropIndex);
- }
- },
-};
-
-export const DNDContext = DndContext(HTML5Backend);
-
-export const DNDSource = name => DragSource(name, cardSource, (connect, monitor) => ({
- connectDragSource: connect.dragSource(),
- isDragging: monitor.isDragging(),
-}));
-
-export const DNDTarget = name => DropTarget(name, cardTarget, connect => ({
- connectDropTarget: connect.dropTarget(),
-}));
diff --git a/frontend/app/components/hocs/userDrawer.tsx b/frontend/app/components/hocs/userDrawer.tsx
deleted file mode 100644
index 7f7e49ce7..000000000
--- a/frontend/app/components/hocs/userDrawer.tsx
+++ /dev/null
@@ -1,67 +0,0 @@
-import React, { useState } from 'react';
-import { Drawer, DrawerProps } from 'antd';
-
-
-interface ExtendedDrawerProps extends DrawerProps {
- visible: boolean;
- onClose: any;
-}
-
-const DrawerComponent: React.FC = ({
- visible,
- onClose,
- title,
- placement,
- children
- }) => {
- return (
-
- {children}
-
- );
-};
-
-const useDrawer = () => {
- const [visible, setVisible] = useState(false);
- const [content, setContent] = useState(null);
- const [drawerProps, setDrawerProps] = useState({
- title: '',
- children: null,
- placement: 'right'
- });
-
- const showDrawer = (component: React.ReactNode, props: DrawerProps) => {
- setContent(component);
- setDrawerProps(props);
- setVisible(true);
- };
-
-
- const DrawerWrapper: React.FC = () => {
- return (
- setVisible(false)}
- {...drawerProps}
- >
- {content}
-
- );
- };
-
- return {
- showDrawer,
- // hideDrawer,
- DrawerWrapper
- };
-};
-
-export default useDrawer;
\ No newline at end of file
diff --git a/frontend/app/components/hocs/withCacheState.js b/frontend/app/components/hocs/withCacheState.js
deleted file mode 100644
index 0bfe7feb1..000000000
--- a/frontend/app/components/hocs/withCacheState.js
+++ /dev/null
@@ -1,71 +0,0 @@
-import React from 'react';
-export default (propNames) => BaseComponent => class extends React.PureComponent {
- state = {
- obj: this.getObjFromProps(),
- changed: false,
- }
-
- getObjFromProps() {
- const obj = {}
- propNames.forEach(propName => {
- obj[ propName ] = this.props[ propName ] || null;
- });
- return obj;
- }
-
- componentDidUpdate(prevProps) {
- if (propNames.some(propName => prevProps[ propName ] !== this.props[ propName ])){
- this.setState({
- obj: this.getObjFromProps(),
- changed: false,
- })
- }
- }
-
- _onChange = ({ name, value, type, checked }) => {
- if ([ 'radio', 'checkbox' ].includes(type)) {
- this.edit(name, checked);
- } else {
- this.edit(name, value);
- }
- }
-
- onChange = ({ target }) => this._onChange(target)
-
- onChangeSemantic = (e, target) => this._onChange(target)
-
- edit = (name, value) => {
- this.setState({
- obj: {
- ...this.state.obj,
- [ name ]: value,
- },
- changed: true,
- });
- }
-
- update = (name, updateFunction = a => a) => {
- this.setState({
- obj: {
- ...this.state.obj,
- [ name ]: updateFunction(this.state.obj[ name ]),
- },
- changed: true,
- });
- }
-
- render() {
-
- return (
-
- );
- }
-}
\ No newline at end of file
diff --git a/frontend/app/components/hocs/withEnumToggle.js b/frontend/app/components/hocs/withEnumToggle.js
deleted file mode 100644
index 2137335fc..000000000
--- a/frontend/app/components/hocs/withEnumToggle.js
+++ /dev/null
@@ -1,21 +0,0 @@
-import React from 'react';
-const withEnumToggle = (stateName = 'active', handlerName = 'setActive', initial) => BaseComponent =>
- class extends React.Component {
- state = {
- active: initial,
- };
-
- setActive = state => this.setState({
- active: state,
- })
-
- render() {
- const newProps = {
- [ handlerName ]: this.setActive,
- [ stateName ]: this.state.active,
- };
- return ;
- }
- };
-
-export default withEnumToggle;
diff --git a/frontend/package.json b/frontend/package.json
index 9710d02b9..344667458 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -21,7 +21,8 @@
"cy:open": "cypress open",
"cy:test": "cypress install && cypress run --browser chrome",
"cy:test-firefox": "cypress install && cypress run --browser firefox",
- "cy:test-edge": "cypress install && cypress run --browser edge"
+ "cy:test-edge": "cypress install && cypress run --browser edge",
+ "check-unimported": "npx unimported"
},
"dependencies": {
"@ant-design/icons": "^5.2.5",