Skip to content

Commit bbe94fb

Browse files
committed
💬 Rename checkThemeRedirect to checkThemeSwitch
1 parent f1272f3 commit bbe94fb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/components/commands/Themes.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { themeContext } from "../../App";
44
import { Wrapper } from "../styles/Output.styled";
55
import { ThemeSpan, ThemesWrapper } from "../styles/Themes.styled";
66
import {
7-
checkThemeRedirect,
7+
checkThemeSwitch,
88
getCurrentCmdArry,
99
isArgInvalid,
1010
} from "../../utils/funcs";
@@ -24,7 +24,7 @@ const Themes: React.FC = () => {
2424

2525
/* ===== check current command makes redirect ===== */
2626
useEffect(() => {
27-
if (checkThemeRedirect(arg, rerender, currentCommand, myThemes)) {
27+
if (checkThemeSwitch(arg, rerender, currentCommand, myThemes)) {
2828
themeSwitcher?.(theme[currentCommand[2]]);
2929
}
3030
}, [arg, rerender, currentCommand]);

src/utils/funcs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export const checkRedirect = (
7373
* @param {string[]} themes - the command of the function
7474
* @returns {boolean} redirect - true | false
7575
*/
76-
export const checkThemeRedirect = (
76+
export const checkThemeSwitch = (
7777
arg: string[],
7878
rerender: boolean,
7979
currentCommand: string[],

0 commit comments

Comments
 (0)