moved some repeated code

This commit is contained in:
plebbitor
2023-03-20 17:08:05 +01:00
parent 1885a105e4
commit 90b53d49fd
14 changed files with 299 additions and 586 deletions
+2 -2
View File
@@ -1,9 +1,9 @@
import React from 'react';
import ContentLoader from 'react-content-loader';
import useBoardStore from '../useBoardStore';
import useAppStore from '../useAppStore';
const SinglePostLoader = () => {
const selectedStyle = useBoardStore((state) => state.selectedStyle);
const selectedStyle = useAppStore((state) => state.selectedStyle);
const backgroundColor = selectedStyle === 'Tomorrow' ? '#333' : '#f3f3f3';
const foregroundColor = selectedStyle === 'Tomorrow' ? '#555' : '#ecebeb';