Merge pull request #16 from LeoOuyang24/LeoOuyang24-main

removed lightswitch
pull/21/head
LeoOuyang24 2022-04-05 16:19:12 -07:00 committed by GitHub
commit 6c56c96df2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 15 deletions

View File

@ -3,7 +3,6 @@ import LangFilters from "./components/LangFilters";
import SectDropdown from "./components/SectDropdown"; import SectDropdown from "./components/SectDropdown";
import SearchBar from "./components/SearchBar"; import SearchBar from "./components/SearchBar";
import SearchResult from "./components/SearchResult"; import SearchResult from "./components/SearchResult";
import LightSwitch from "./components/LightSwitch";
import axios from "axios"; import axios from "axios";
import Fuse from "fuse.js"; import Fuse from "fuse.js";
import { ThemeContext, themes, swapMode } from './darkMode'; import { ThemeContext, themes, swapMode } from './darkMode';

View File

@ -1,14 +0,0 @@
import React, { useState, useEffect } from "react";
function LightSwitch(App){
const [lightMode, setLightMode] = useState(false);
return (
<img src={lightMode ? "https://toppng.com/uploads/preview/sun-11545692406nbrflpmao0.png" : "https://www.kindpng.com/picc/m/293-2939577_clip-art-drawing-of-moon-and-stars-star.png"}
onClick = {()=>setLightMode(!lightMode)} style={{width: "100px", height: "100px",display: "block",
marginLeft: "auto",
marginRight: "auto",
}}/>
)
}
export default LightSwitch;