Skip to content

Commit dd4f47c

Browse files
authored
Merge pull request #167 from GTBitsOfGood/camp_banner
Add Camp Grace reminder banner
2 parents 099e4aa + f02f106 commit dd4f47c

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed
+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
import React, { useEffect, useState } from "react";
2+
import { View, Text, StyleSheet, TouchableOpacity } from "react-native";
3+
import dayjs from "dayjs";
4+
5+
const CampGraceBanner = () => {
6+
const isCampGraceDay = new Date().getMonth() === 3 && new Date().getDate() === 13;
7+
8+
if (!isCampGraceDay) return null;
9+
10+
return (
11+
<View style={styles.banner}>
12+
<Text style={styles.title}>Countdown to Camp Grace!</Text>
13+
<Text style={styles.message}>
14+
Get ready for a 4-Day advanced training at Camp Grace in Mobile, Alabama! Enjoy free cabin accommodations, fishing, kayaking, and group cooking sessions. Just bring bedding for a twin bed. See you soon!
15+
</Text>
16+
</View>
17+
);
18+
};
19+
20+
const styles = StyleSheet.create({
21+
banner: {
22+
borderRadius: 10,
23+
backgroundColor: "#3F3BED",
24+
marginBottom: 10,
25+
padding: 10,
26+
display: "flex",
27+
flexDirection: "column",
28+
gap: 5,
29+
opacity: 0.9,
30+
},
31+
title: {
32+
color: "white",
33+
fontSize: 14,
34+
fontWeight: "700",
35+
textAlign: "center",
36+
},
37+
message: {
38+
color: "white",
39+
fontSize: 12,
40+
fontWeight: "400",
41+
textAlign: "center",
42+
}
43+
});
44+
45+
export default CampGraceBanner;

mobile/screens/User/UserDashboardScreen.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import HolidayBanner from "../Banners/HolidayBanner";
3131
import DonationBanner from "../Banners/DonationBanner";
3232
import PillBanner from "../Banners/PillBanner";
3333
import CleaningBanner from "../Banners/CleaningBanner";
34+
import CampGraceBanner from "../Banners/CampGraceBanner";
3435
import BaseOverlay from "../../components/Overlays/BaseOverlay";
3536
import DashboardHeader from "../../components/DashboardHeader";
3637
import { endOfExecutionHandler, ErrorWrapper } from "../../utils/error";
@@ -317,6 +318,7 @@ export default function UserDashboardScreen(props: any) {
317318
<BirthdayBanner />
318319
<HolidayBanner />
319320
<DonationBanner />
321+
<CampGraceBanner />
320322
{new Date().getDate() === 1 ? <PillBanner /> : null}
321323
{new Date().getMonth() === 1 ? <CleaningBanner /> : null}
322324

0 commit comments

Comments
 (0)