Skip to content
This repository was archived by the owner on Oct 2, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions src/components/organisms/TaskAdd.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { Dialog, DialogContent, DialogTitle } from '@mui/material';
import { useState } from 'react';

import { useAddTask } from '../../lib/api/useAddTask';
import { useTimezone } from '../../lib/api/useTimezone';
import * as browser from '../../lib/browser';
import TaskForm from './TaskForm';

Expand All @@ -27,7 +26,6 @@ export default function TaskAdd({
onSave: (t: TaskType) => void;
baseTask?: TaskType;
}): JSX.Element {
const timezone = useTimezone() || '';
const addTask = useAddTask(onSave);
const [task, setTask] = useState<string>(baseTask?.task || '');
const [due, setDue] = useState<number>(() => {
Expand Down Expand Up @@ -80,7 +78,6 @@ export default function TaskAdd({
task={task}
due={due}
cents={cents}
timezone={timezone}
error={error}
onChange={onChange}
onCancel={onClose}
Expand Down
3 changes: 0 additions & 3 deletions src/components/organisms/TaskEdit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { Dialog, DialogContent, DialogTitle, MenuItem } from '@mui/material';
import { useState } from 'react';

import useEditTask from '../../lib/api/useEditTask';
import { useTimezone } from '../../lib/api/useTimezone';
import TaskForm from './TaskForm';

const TaskEdit = ({
Expand All @@ -12,7 +11,6 @@ const TaskEdit = ({
task: TaskType;
onOpen?: () => void;
}): JSX.Element => {
const timezone = useTimezone() || '';
const [due, setDue] = useState<number>(task.due);
const [cents, setCents] = useState<number>(task.cents);
const [error, setError] = useState<string>('');
Expand Down Expand Up @@ -69,7 +67,6 @@ const TaskEdit = ({
task={task.task}
due={due}
cents={cents}
timezone={timezone}
error={editTask.error?.message || error || ''}
onChange={onChange}
onCancel={() => setIsOpen(false)}
Expand Down
3 changes: 0 additions & 3 deletions src/components/organisms/TaskForm.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ interface RenderComponentProps {
task?: string;
due?: number;
cents?: number;
timezone?: string;
error?: string;
onChange?: (updates: Partial<TaskInput>) => void;
onCancel?: () => void;
Expand All @@ -25,7 +24,6 @@ const renderComponent = (props: RenderComponentProps = {}) => {
task = '',
due = new Date('1/1/2022, 11:59 PM').getTime() / 1000,
cents = 500,
timezone = '',
error = '',
onChange = () => undefined,
onCancel = () => undefined,
Expand All @@ -39,7 +37,6 @@ const renderComponent = (props: RenderComponentProps = {}) => {
task,
due,
cents,
timezone,
error,
onChange,
onCancel,
Expand Down
11 changes: 0 additions & 11 deletions src/components/organisms/TaskForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
Box,
Button,
InputAdornment,
Link,
Stack,
TextField,
} from '@mui/material';
Expand All @@ -18,7 +17,6 @@ interface TaskFormProps {
task: string;
due?: number;
cents: number;
timezone: string;
error: string;
onChange: (updates: Partial<TaskInput>) => void;
onCancel: () => void;
Expand All @@ -36,7 +34,6 @@ const TaskForm = (props: TaskFormProps): JSX.Element => {
task,
due,
cents,
timezone,
error,
onChange,
onCancel,
Expand Down Expand Up @@ -99,14 +96,6 @@ const TaskForm = (props: TaskFormProps): JSX.Element => {
''
)}

<Link
href={'https://taskratchet.com/help/timezones.html'}
target={'_blank'}
rel={'noopener noreferrer'}
>
{timezone}
</Link>

<Stack direction={'row'} spacing={2} justifyContent="end">
<Button onClick={onCancel} variant="outlined">
Cancel
Expand Down
2 changes: 0 additions & 2 deletions src/components/pages/Settings.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { beforeEach, describe, expect, it, vi } from 'vitest';

import { useResetApiToken } from '../../lib/api/useResetApiToken';
import { loadMe } from '../../lib/test/loadMe';
import { loadTimezones } from '../../lib/test/loadTimezones';
import { renderWithQueryProvider } from '../../lib/test/renderWithQueryProvider';
import Settings from './Settings';

Expand All @@ -27,7 +26,6 @@ describe('settings page', () => {
});

it('includes Beeminder integration settings', async () => {
loadTimezones();
loadMe({});

renderWithQueryProvider(<Settings />);
Expand Down
11 changes: 0 additions & 11 deletions src/components/pages/Tasks.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ vi.mock('../../lib/api/fetch1');
vi.mock('../../lib/api/getTasks');
vi.mock('../../lib/api/getMe');
vi.mock('../../lib/api/updateTask');
vi.mock('../../lib/api/getTimezones');
vi.mock('../../lib/api/addTask');
vi.mock('../../lib/LegacyApi');
vi.mock('../../lib/getUnloadMessage');
Expand Down Expand Up @@ -117,16 +116,6 @@ describe('tasks page', () => {
expect(addTask).not.toHaveBeenCalled();
});

it('displays timezone', async () => {
loadTasksApiData({ me: { timezone: 'the_timezone' } });

const { openForm } = renderTasksPage();

await openForm();

await screen.findByText('the_timezone');
});

it('tells api task is complete', async () => {
loadTasksApiData({
tasks: [makeTask({ id: '3' })],
Expand Down
7 changes: 0 additions & 7 deletions src/lib/api/useTimezone.ts

This file was deleted.

6 changes: 0 additions & 6 deletions src/lib/test/loadTimezones.tsx

This file was deleted.

Loading