- {tag.icon ? (
- tagIcons[tag.type] ? (
- tagIcons[tag.type]
- ) : (
-
+ {tag.icon ? (
+ tagIcons[tag.type] ? (
+ tagIcons[tag.type]
+ ) : (
+
+ )
+ ) : null}
+
+ {tag.name}
- ),
- value: tag.type,
- disabled: disable && tag.type !== 'all',
- }));
-
- const onPick = (tabValue: string) => {
- const tab = tags.find((t) => t.type === tabValue);
- if (tab) {
- setActiveTab(tab);
- }
- };
- return (
-
-
- );
- }
-);
+ ),
+ value: tag.type,
+ disabled: disable && tag.type !== 'all',
+ }));
+
+ const onPick = (tabValue: string) => {
+ const tab = tags.find((t) => t.type === tabValue);
+ if (tab) {
+ setActiveTab(tab);
+ }
+ };
+ return (
+
+
+
+ );
+};
// Separate the TagItem into its own memoized component.
export const TagItem: React.FC<{
@@ -138,4 +136,7 @@ const mapDispatchToProps = (dispatch: any): DispatchProps =>
dispatch
);
-export default connect(mapStateToProps, mapDispatchToProps)(observer(SessionTags));
+export default connect(
+ mapStateToProps,
+ mapDispatchToProps
+)(observer(SessionTags));
diff --git a/frontend/app/components/shared/TrackingCodeModal/ProjectCodeSnippet/ProjectCodeSnippet.js b/frontend/app/components/shared/TrackingCodeModal/ProjectCodeSnippet/ProjectCodeSnippet.js
index abe89daad..925526bcf 100644
--- a/frontend/app/components/shared/TrackingCodeModal/ProjectCodeSnippet/ProjectCodeSnippet.js
+++ b/frontend/app/components/shared/TrackingCodeModal/ProjectCodeSnippet/ProjectCodeSnippet.js
@@ -1,6 +1,6 @@
import React, { useState } from 'react'
import { observer } from 'mobx-react-lite'
-import { useStore } from 'Project/mstore'
+import { useStore } from 'App/mstore'
import { Checkbox } from 'UI';
import cn from 'classnames'
import styles from './projectCodeSnippet.module.css'
diff --git a/frontend/app/duck/index.ts b/frontend/app/duck/index.ts
index 941c9b7ea..915174701 100644
--- a/frontend/app/duck/index.ts
+++ b/frontend/app/duck/index.ts
@@ -3,8 +3,6 @@ import { combineReducers } from 'redux-immutable';
import user from './user';
import sessions from './sessions';
-import sources from './sources';
-import site from './site';
import customFields from './customField';
import search from './search';
import liveSearch from './liveSearch';
@@ -12,11 +10,9 @@ import liveSearch from './liveSearch';
const rootReducer = combineReducers({
user,
sessions,
- site,
customFields,
search,
liveSearch,
- ...sources
});
export type RootStore = ReturnType
diff --git a/frontend/app/duck/sources/index.js b/frontend/app/duck/sources/index.js
deleted file mode 100644
index 66203d13a..000000000
--- a/frontend/app/duck/sources/index.js
+++ /dev/null
@@ -1,24 +0,0 @@
-import { fromJS, Map, List } from 'immutable';
-import listSourceCreator, { getAction } from './listSourceCreator';
-
-
-const filtersFromJS = data => fromJS(data)
- .update('USERDEVICE', list => list.filter(value => value !== ""))
- .update('FID0', list => list.filter(value => value !== ""))
-
-export default {
- values: listSourceCreator('values', '/events/values', ({ value }) => value),
- selectors: listSourceCreator('selectors', '/events/selectors', ({ targetSelector }) => targetSelector),
- filterValues: listSourceCreator('filterValues', '/sessions/filters', filtersFromJS, true, Map({
- USEROS: List(),
- USERBROWSER: List(),
- USERDEVICE: List(),
- FID0: List(),
- REFERRER: List(),
- USERCOUNTRY: List(),
- })),
-};
-
-export function fetch(name, params) {
- return getAction(name, params);
-}
diff --git a/frontend/app/duck/sources/listSourceCreator.js b/frontend/app/duck/sources/listSourceCreator.js
deleted file mode 100644
index a82473f20..000000000
--- a/frontend/app/duck/sources/listSourceCreator.js
+++ /dev/null
@@ -1,39 +0,0 @@
-import { List, Map } from 'immutable';
-import withRequestState, { RequestTypes } from 'Duck/requestStateCreator';
-
-const actionMap = {};
-
-export default (
- name,
- endpoint,
- fromJS = a => a,
- convertFromRoot = false,
- customInitialState = Map({ list: List() }),
-) => {
- const initialState = customInitialState || Map({
- list: List(),
- });
-
- const FETCH_LIST = new RequestTypes(`${ name }/FETCH_LIST`);
-
- actionMap[ name ] = params => ({
- types: FETCH_LIST.toArray(),
- call: client => client.get(endpoint, params),
- });
-
- const reducer = (state = initialState, action = {}) => {
- switch (action.type) {
- case FETCH_LIST.SUCCESS:
- return convertFromRoot
- ? state.merge(fromJS(action.data))
- : state.set('list', List(action.data).map(fromJS).toSet().toList()); // ??
- }
- return state;
- };
-
- return withRequestState(FETCH_LIST, reducer);
-};
-
-export function getAction(name, params) {
- return actionMap[ name ](params);
-}