14 lines
329 B
JavaScript
14 lines
329 B
JavaScript
|
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;
|
||
|
}
|