Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import React from 'react'
import PropTypes from 'prop-types'
import { kea } from 'kea'
const logic = kea({
path: () => ['kea'],
actions: () => ({
increment: amount => ({ amount }),
decrement: amount => ({ amount }),
}),
reducers: ({ actions }) => ({
counter: [
0,
PropTypes.number,
{
[actions.increment]: (state, payload) => state + payload.amount,
[actions.decrement]: (state, payload) => state - payload.amount,
},
],
}),
selectors: ({ selectors }) => ({
import './styles.scss'
import React, { Component } from 'react'
import { kea } from 'kea'
import PropTypes from 'prop-types'
import explorerLogic from '~/scenes/explorer/logic'
export const colors = ['#1f77b4', '#ff7f0e', '#2ca02c', '#d62728', '#9467bd', '#8c564b', '#e377c2', '#7f7f7f', '#bcbd22', '#17becf']
@kea({
connect: {
actions: [
explorerLogic, [
'setGraphTimeGroup',
'setGraphControls'
]
],
props: [
explorerLogic, [
'graphTimeGroup'
]
]
},
actions: () => ({
showMore: true
import { kea } from 'kea'
import PropTypes from 'prop-types'
import explorerLogic from '~/scenes/explorer/logic'
export const colors = ['#1f77b4', '#ff7f0e', '#2ca02c', '#d62728', '#9467bd', '#8c564b', '#e377c2', '#7f7f7f', '#bcbd22', '#17becf']
const compareWithForTimeGroup = {
year: [0, 1, 2, 3, 4],
quarter: [0, 1, 2, 4],
month: [0, 1, 3, 6, 12, 24],
week: [0, 1, 4, 12, 52],
day: [0, 1, 7, 28, 364, 365]
}
@kea({
connect: {
actions: [
explorerLogic, [
'setGraphControls'
]
],
props: [
explorerLogic, [
'graphControls',
'graphTimeGroup'
]
]
},
actions: () => ({
showMore: true,