Skip to content

Commit 64f8241

Browse files
author
Pascal Wegner
committed
Remove currently unused code
1 parent a7d8635 commit 64f8241

File tree

2 files changed

+2
-24
lines changed

2 files changed

+2
-24
lines changed

packages/mobile/src/context/theme-context.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ export type TThemeContext = {
99
spaces: Theme['spaces'];
1010
isDark: boolean;
1111
};
12+
/* don't need to test default */
13+
/* istanbul ignore next */
1214
export const ThemeContext = React.createContext<TThemeContext>({
13-
/* don't need to test default toggle right now */
14-
/* istanbul ignore next */
1515
toggle: () => {
1616
// do nothing
1717
},

packages/mobile/src/pages/Home.tsx

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import { theme } from '../theme';
2323

2424
export function Home(): JSX.Element {
2525
const {
26-
service,
2726
setBreakInterval,
2827
setRounds,
2928
setWorkInterval,
@@ -33,27 +32,6 @@ export function Home(): JSX.Element {
3332

3433
const { colors, spaces, fontSizes, isDark, toggle } = useTheme();
3534

36-
React.useEffect(() => {
37-
let interval: NodeJS.Timeout | null = null;
38-
const subscription = service.subscribe((newState) => {
39-
if (newState.event.type === 'START') {
40-
interval = setInterval(() => {
41-
service.send({ type: 'TICK' });
42-
}, 50);
43-
} else if (newState.event.type === 'STOP') {
44-
if (interval) {
45-
clearInterval(interval);
46-
}
47-
}
48-
});
49-
return (): void => {
50-
subscription.unsubscribe();
51-
if (interval) {
52-
clearInterval(interval);
53-
}
54-
};
55-
}, [service]);
56-
5735
const { breakInterval, rounds, workInterval } = state.context;
5836

5937
const themedContainerStyle: StyleProp<ViewStyle> = {

0 commit comments

Comments
 (0)