import { getItem } from './safe-storage';

export default function getInitialState() {
  let initialState = {
    topics: {}
  };
  const allTopics = getItem('allTopics');
  if (allTopics) {
    initialState.topics.allTopics = JSON.parse(allTopics);
    initialState.topics.loadingAllTopics = false;
  }

  return initialState;
}