synapsecns/sanguine

View on GitHub
packages/synapse-interface/slices/portfolio/actions.ts

Summary

Maintainability
A
0 mins
Test Coverage
import { createAction } from '@reduxjs/toolkit'

export enum PortfolioTabs {
  PORTFOLIO = 'portfolio',
  ACTIVITY = 'activity',
}

export enum FetchState {
  IDLE = 'idle',
  LOADING = 'loading',
  VALID = 'valid',
  INVALID = 'invalid',
}

export const setActiveTab = createAction<PortfolioTabs>(
  'portfolio/setActiveTab'
)
export const typeSearchInput = createAction<{ searchInput: string }>(
  'portfolio/typeSearchInput'
)
export const resetPortfolioState = createAction<void>(
  'portfolio/resetPortfolioState'
)
export const resetSearchState = createAction<void>('portfolio/resetSearchState')