-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changed exports from default to named
- Loading branch information
1 parent
47da5d3
commit af48717
Showing
11 changed files
with
23 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,17 @@ | ||
import { useState } from 'react'; | ||
import { DarkModeSwitch } from 'react-toggle-dark-mode'; | ||
import { useState } from "react"; | ||
import { DarkModeSwitch } from "react-toggle-dark-mode"; | ||
|
||
const DarkModeToggle = () => { | ||
export const DarkModeToggle = () => { | ||
const [isDarkMode, setDarkMode] = useState(false); | ||
|
||
const toggleDarkMode = (checked: boolean) => { | ||
setDarkMode(checked); | ||
isDarkMode | ||
? document.documentElement.classList.remove('dark') | ||
: document.documentElement.classList.add('dark'); | ||
? document.documentElement.classList.remove("dark") | ||
: document.documentElement.classList.add("dark"); | ||
}; | ||
|
||
return ( | ||
<DarkModeSwitch checked={isDarkMode} onChange={toggleDarkMode} size={35} /> | ||
); | ||
}; | ||
|
||
export default DarkModeToggle; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,12 @@ | ||
import Loader from 'react-loader-spinner'; | ||
import Loader from "react-loader-spinner"; | ||
|
||
interface Props { | ||
isLoading: boolean; | ||
} | ||
|
||
const Loading = ({ isLoading }: Props) => | ||
export const Loading = ({ isLoading }: Props) => | ||
isLoading ? ( | ||
<div className="flex justify-center"> | ||
<Loader type="TailSpin" color="#009900" height={100} width={100} /> | ||
</div> | ||
) : null; | ||
|
||
export default Loading; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters