separate theme management

This commit is contained in:
SethBurkart123
2023-11-02 18:14:13 +11:00
parent 49bf19afd5
commit 1c86fd3f9b
3 changed files with 55 additions and 55 deletions
@@ -2,6 +2,7 @@ import { ChangeEvent, useEffect, useState } from "react";
import { downloadPresetBackground, openDB, readAllData, writeData } from "../hooks/BackgroundDataLoader";
import presetBackgrounds from "../assets/presetBackgrounds";
import "./BackgroundSelector.css";
import { disableTheme } from "../hooks/ThemeManagment";
// Custom Types and Interfaces
export interface Background {
@@ -69,6 +70,7 @@ export default function BackgroundSelector() {
};
const selectBackground = (fileId: string): void => {
disableTheme();
setSelectedBackground(fileId);
localStorage.setItem('selectedBackground', fileId);
};