Commit 32585762 authored by nickstiffler's avatar nickstiffler Committed by Yannis Barlas

fix(dashboard): filter the dashboard when there is stored status

parent 3645981e
......@@ -150,10 +150,19 @@ const Dashboard = props => {
? JSON.parse(localStorage.getItem('selectedStatuses'))
: []
const initialArticles = () => {
if (storedStatuses.length > 0) {
return editorArticles.filter(article =>
storedStatuses.map(s => s.value).includes(article.displayStatus),
)
}
return editorArticles
}
return (
<State
initial={{
filteredArticles: editorArticles,
filteredArticles: initialArticles(),
previewData: null,
savedStatuses: storedStatuses,
showModal: false,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment