Skip to content

Commit 0dcc2a6

Browse files
author
Jon Waldstein
committed
chore: cleanup unused
1 parent 60717eb commit 0dcc2a6

File tree

1 file changed

+1
-34
lines changed
  • src/Campaigns/resources/admin/components/CampaignFormModal

1 file changed

+1
-34
lines changed

src/Campaigns/resources/admin/components/CampaignFormModal/index.tsx

Lines changed: 1 addition & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -18,44 +18,11 @@ import {getGiveCampaignsListTableWindowData} from '../CampaignsListTable';
1818
import {amountFormatter} from '@givewp/campaigns/utils';
1919
import TextareaControl from '../CampaignDetailsPage/Components/TextareaControl';
2020
import {CampaignGoalInputAttributes, isValidGoalType} from '../../constants/goalInputAttributes';
21-
import { formatToDateTimeLocalInput } from '@givewp/admin/common';
21+
import {formatToDateTimeLocalInput} from '@givewp/admin/common';
2222

2323
const {currency, isRecurringEnabled} = getGiveCampaignsListTableWindowData();
2424
const currencyFormatter = amountFormatter(currency);
2525

26-
/**
27-
* Get the next sharp hour
28-
*
29-
* @since 4.0.0
30-
*/
31-
const getNextSharpHour = (hoursToAdd: number) => {
32-
const date = new Date();
33-
date.setHours(date.getHours() + hoursToAdd, 0, 0, 0);
34-
35-
return date;
36-
};
37-
38-
/**
39-
* Format a given date to be used in datetime inputs
40-
*
41-
* @since 4.0.0
42-
*/
43-
const getDateString = (date: Date) => {
44-
const offsetInMilliseconds = date.getTimezoneOffset() * 60 * 1000;
45-
const dateWithOffset = new Date(date.getTime() - offsetInMilliseconds);
46-
47-
return removeTimezoneFromDateISOString(dateWithOffset.toISOString());
48-
};
49-
50-
/**
51-
* Remove timezone from date string
52-
*
53-
* @since 4.0.0
54-
*/
55-
const removeTimezoneFromDateISOString = (date: string) => {
56-
return date.slice(0, -5);
57-
};
58-
5926
/**
6027
* @since 4.0.0
6128
*/

0 commit comments

Comments
 (0)