Skip to content

Commit 4d12b07

Browse files
authored
Merge pull request #177 from m2mathew/fix/move_july_1_to_august_1
Fix/move july 1 to august 1
2 parents d1458ce + 573eee4 commit 4d12b07

11 files changed

+34
-25
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "tmac-website",
33
"description": "Website for the Texas Music Administrators Conference",
4-
"version": "2.25.0",
4+
"version": "2.26.0",
55
"repository": {
66
"type": "git",
77
"url": "https://github.com/m2mathew/tmac-website"

src/components/about/History.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import Motifs from '../shared/Motifs';
99

1010
// Local Variables
1111
const StyledRoot = styled.section(({ theme }) => ({
12-
1312
address: {
1413
'& > p': {
1514
fontWeight: 500,

src/components/register/MemberRegisterContent.tsx

+6-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import React, { useEffect, useReducer } from 'react';
44
import styled from 'styled-components';
55

66
// Internal Dependencies
7-
import { isTodayAfterJune30th } from '../../utils/helpers';
7+
import { isTodayAfterJuly31st } from '../../utils/helpers';
88
import { useGetAuthUser } from '../../utils/hooks/useGetAuthUser';
99
import Container from '../shared/container';
1010
import RegisterEmail from './RegisterEmail';
@@ -212,8 +212,11 @@ const MemberRegisterContent: React.FC = () => {
212212

213213
const hasCompletedAllMemberSteps = completedMemberSteps.length >= 3;
214214

215-
// We normally shut down registration and sponsorship after TMEA each year and open it up on 7/1
216-
const showMembershipCompleteNote = isTodayAfterJune30th;
215+
console.log('isTodayAfterJuly31st', isTodayAfterJuly31st);
216+
217+
// We normally shut down registration and sponsorship after TMEA each year and open it up on 8/1.
218+
// This might change, so we need to talk to the Executive Secretary for the most up-to-date info.
219+
const showMembershipCompleteNote = isTodayAfterJuly31st;
217220

218221
/* Children change depending on which step is active */
219222
return (

src/components/register/RegisterEmail.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import React, { useCallback, useEffect, useMemo, useState } from 'react';
33

44
// Internal Dependencies
55
import { appNameShort } from '../../utils/app-constants';
6-
import { isTodayAfterJune30th } from '../../utils/helpers';
6+
import { isTodayAfterJuly31st } from '../../utils/helpers';
77
import { MemberFormValues } from './MemberRegisterContent';
88
import { SponsorFormValues } from './SponsorRegisterContent';
99
import FormDivider from '../shared/FormDivider';
@@ -84,7 +84,7 @@ const RegisterEmail: React.FC<Props> = ({
8484
]);
8585

8686
// We normally shut down registration and sponsorship after TMEA each year and open it up on 7/1
87-
if (!isTodayAfterJune30th) {
87+
if (!isTodayAfterJuly31st) {
8888
return <RegistrationPausedAlert />;
8989
}
9090

src/components/register/RegisterStepper.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import styled from 'styled-components';
88

99
// Internal Dependencies
1010
import { appNameShort } from '../../utils/app-constants';
11-
import { isTodayAfterJune30th } from '../../utils/helpers';
11+
import { isTodayAfterJuly31st } from '../../utils/helpers';
1212
import DrumBanner from '../shared/DrumBanner';
1313
import EnhancedCard from '../shared/EnhancedCard';
1414

@@ -102,7 +102,7 @@ const RegisterStepper: React.FC<Props> = ({
102102
const steps = getSteps(isAuthenticated, isViewingSponsors);
103103

104104
// We normally shut down registration and sponsorship after TMEA each year and open it up on 7/1
105-
if (!isTodayAfterJune30th) {
105+
if (!isTodayAfterJuly31st) {
106106
return <DrumBanner drumBannerTitle="Registration Closed" />;
107107
}
108108

src/components/register/register-member-form-wrapper.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
MemberFormValues,
88
} from './MemberRegisterContent';
99
import { appNameShort } from '../../utils/app-constants';
10-
import { isTodayAfterJune30th } from '../../utils/helpers';
10+
import { isTodayAfterJuly31st } from '../../utils/helpers';
1111
import FormDivider from '../shared/FormDivider';
1212
import FormTitle from '../shared/FormTitle';
1313
import RegisterForm from './register-member-form';
@@ -31,7 +31,7 @@ const MemberFormValuesWrapper: React.FC<Props> = ({
3131
}
3232

3333
// We normally shut down registration and sponsorship after TMEA each year and open it up on 7/1
34-
const showMembershipForm = isTodayAfterJune30th;
34+
const showMembershipForm = isTodayAfterJuly31st;
3535

3636
if (!showMembershipForm) {
3737
return <RegistrationPausedAlert />;

src/components/shared/RegistrationPausedAlert.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const RegistrationPausedAlert: React.FC<Props> = ({ isMembership = true }) => {
1616
return (
1717
<Box mt={3}>
1818
<EnhancedAlert title={`${type} Notice`}>
19-
{appNameShort} {type} will open up again on July 1st.
19+
{appNameShort} {type} will open up again on August 1st.
2020
</EnhancedAlert>
2121
</Box>
2222
);

src/pages/members/join.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import React from 'react';
77
import styled from 'styled-components';
88

99
// Internal Dependencies
10-
import { isTodayAfterJune30th } from '../../utils/helpers';
10+
import { isTodayAfterJuly31st } from '../../utils/helpers';
1111
import ArrowForwardIcon from '../../components/shared/ArrowForwardIcon';
1212
import AuthUserContext from '../../components/session/AuthUserContext';
1313
import CardHeadline from '../../components/shared/cards/card-headline';
@@ -56,11 +56,11 @@ const JoinContainer = ({ location }) => {
5656
<div className="topContent">
5757
<CardHeadline>Join TMAC</CardHeadline>
5858

59-
{!isTodayAfterJune30th
59+
{!isTodayAfterJuly31st
6060
? (
6161
<Box mt={3}>
6262
<EnhancedAlert title="Membership Notice">
63-
TMAC Membership will open up again on July 1st.
63+
TMAC Membership will open up again on August 1st.
6464
</EnhancedAlert>
6565
</Box>
6666
) : (
@@ -103,7 +103,7 @@ const JoinContainer = ({ location }) => {
103103
)}
104104
</div>
105105

106-
{isTodayAfterJune30th && (
106+
{isTodayAfterJuly31st && (
107107
<>
108108
<div className="bottomContent">
109109
<CtaButton

src/pages/members/login.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ const StyledRoot = styled.div(({ theme }) => ({
4343
flexDirection: 'column',
4444
flexWrap: 'wrap',
4545
justifyContent: 'space-around',
46+
overflow: 'hidden',
4647
position: 'relative',
4748
width: '100vw',
4849
}));
@@ -66,11 +67,10 @@ const Login: React.FC<Props> = ({ location }) => {
6667
>
6768
<ReCaptchaProvider>
6869
<StyledRoot>
69-
<Motifs small />
70-
7170
<DrumBanner drumBannerTitle="Member Log In" />
7271

7372
<div className="loginContent">
73+
<Motifs small />
7474

7575
<Typography
7676
className="loginTitle"

src/pages/sponsors/sponsor-info.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import styled from 'styled-components';
66

77
// Internal Dependencies
88
import { appNameShort } from '../../utils/app-constants';
9-
import { isTodayAfterJune30th } from '../../utils/helpers';
9+
import { isTodayAfterJuly31st } from '../../utils/helpers';
1010
import Container from '../../components/shared/container';
1111
import CtaButton from '../../components/shared/CtaButton';
1212
import Layout from '../../components/layout';
@@ -42,7 +42,7 @@ const StyledRoot = styled.div(({ theme }) => ({
4242
// Component Definition
4343
const SponsorInfo: React.FC<Props> = ({ location }) => {
4444
// We normally shut down registration and sponsorship after TMEA each year and open it up on 7/1
45-
const showSponsorshipInfo = isTodayAfterJune30th;
45+
const showSponsorshipInfo = isTodayAfterJuly31st;
4646

4747
return (
4848
<Layout

src/utils/helpers.ts

+12-5
Original file line numberDiff line numberDiff line change
@@ -45,19 +45,26 @@ export const currentYearShort = format(new Date(), 'yy');
4545

4646
// The "year" for TMAC starts on 7/1
4747
// new Date(2021, 6, 1) → 7/1/2021
48-
export const isTodayAfterJune30th = isAfter(
48+
// export const isTodayAfterJune30th = isAfter(
49+
// new Date(),
50+
// new Date(parseInt(currentYearLong, 10), 6, 1),
51+
// );
52+
53+
// As of 2023-06-28, the "year" for TMAC starts on 8/1
54+
// new Date(2023, 7, 1) → 8/1/2023
55+
export const isTodayAfterJuly31st = isAfter(
4956
new Date(),
50-
new Date(parseInt(currentYearLong, 10), 6, 1),
57+
new Date(parseInt(currentYearLong, 10), 7, 1),
5158
);
5259

53-
export const currentSchoolYearShort = isTodayAfterJune30th
60+
export const currentSchoolYearShort = isTodayAfterJuly31st
5461
? `${currentYearShort}-${Number(currentYearShort) + 1}`
5562
: `${Number(currentYearShort) - 1}-${currentYearShort}`;
5663

57-
export const currentSchoolYearLong = isTodayAfterJune30th
64+
export const currentSchoolYearLong = isTodayAfterJuly31st
5865
? `${currentYearLong}-${Number(currentYearLong) + 1}`
5966
: `${Number(currentYearLong) - 1}-${currentYearLong}`;
6067

61-
export const currentSchoolYearEnding = isTodayAfterJune30th
68+
export const currentSchoolYearEnding = isTodayAfterJuly31st
6269
? `${Number(currentYearLong) + 1}`
6370
: currentYearLong;

0 commit comments

Comments
 (0)