chore: add some code format

This commit is contained in:
Joxit 2023-04-16 18:33:22 +02:00
parent 4f452207c4
commit ea508e6a1d
No known key found for this signature in database
GPG key ID: F526592B8E012263
2 changed files with 3 additions and 3 deletions

View file

@ -265,8 +265,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
if (this.state.orderType === 'date') {
sortedTags.sort((e1, e2) =>
!this.state.desc
? (e2.creationDate?.getTime()||0) - (e1.creationDate?.getTime()||0)
: (e1.creationDate?.getTime()||0) - (e2.creationDate?.getTime()||0)
? (e2.creationDate?.getTime() || 0) - (e1.creationDate?.getTime() || 0)
: (e1.creationDate?.getTime() || 0) - (e2.creationDate?.getTime() || 0)
);
} else if (this.state.orderType === 'size') {
sortedTags.sort((e1, e2) => (!this.state.desc ? e2.size - e1.size : e1.size - e2.size));

View file

@ -34,7 +34,7 @@ const normalizeKey = (k) =>
.replace(/^theme-/, '');
const preferDarkMode = ({ theme }) => {
if (theme === 'auto' || theme === "") {
if (theme === 'auto' || theme === '') {
switch (localStorage.getItem(LOCAL_STORAGE_THEME)) {
case 'dark':
return true;