Skip to content

Commit 1224ff6

Browse files
committed
Merge branch 'main' into search-component-translations
2 parents 3aab94e + b6e19b9 commit 1224ff6

File tree

11 files changed

+39
-22
lines changed

11 files changed

+39
-22
lines changed

components/Card/CardTitle.tsx

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ interface CardTitleProps {
1717
isUserMatch?: boolean
1818
type?: string
1919
userRole?: string
20+
isNewsfeed?: string
2021
}
2122

2223
export const CardTitle = (props: CardTitleProps) => {
@@ -29,7 +30,8 @@ export const CardTitle = (props: CardTitleProps) => {
2930
isUserMatch,
3031
subheader,
3132
type,
32-
userRole
33+
userRole,
34+
isNewsfeed
3335
} = props
3436

3537
return (
@@ -44,14 +46,18 @@ export const CardTitle = (props: CardTitleProps) => {
4446
subheader={subheader}
4547
type={type}
4648
/>
47-
<CardTitleFollowing
48-
billId={billId}
49-
header={header}
50-
subheader={subheader}
51-
isBillMatch={isBillMatch}
52-
isUserMatch={isUserMatch}
53-
type={type}
54-
/>
49+
{isNewsfeed ? (
50+
<CardTitleFollowing
51+
billId={billId}
52+
header={header}
53+
subheader={subheader}
54+
isBillMatch={isBillMatch}
55+
isUserMatch={isUserMatch}
56+
type={type}
57+
/>
58+
) : (
59+
<></>
60+
)}
5561
</CardBootstrap.Body>
5662
</CardBootstrap.Body>
5763
)

components/EditProfilePage/ProfileSettingsModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export default function ProfileSettingsModal({
8282

8383
const handleToggleNotifications = async () => {
8484
if (notifications === "None") {
85-
setNotifications("Monthly")
85+
setNotifications("Weekly")
8686
} else {
8787
setNotifications("None")
8888
}

components/Footer/Footer.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import CustomDropdown, {
1111
CustomDropdownProps
1212
} from "components/Footer/CustomFooterDropdown"
1313
import { FooterContainer } from "./FooterContainer"
14+
import { NEWSLETTER_SIGNUP_URL } from "components/common"
1415

1516
export type PageFooterProps = {
1617
children?: any
@@ -282,7 +283,7 @@ const PageFooter = (props: PageFooterProps) => {
282283
{t("legal.disclaimer")}
283284
{" - "}
284285
<a
285-
href="https://cdn.forms-content.sg-form.com/d049f1ab-b547-11ee-9605-72ceb6b6e337"
286+
href={NEWSLETTER_SIGNUP_URL}
286287
style={{ color: "white" }}
287288
target="_blank"
288289
rel="noopener noreferrer"

components/HeroHeader/HeroHeader.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import ScrollTrackingItem from "../ScrollTrackEffect/ScrollTrackerItem"
66
import styles from "./HeroHeader.module.css"
77
import { useTranslation } from "next-i18next"
88
import { capitalize } from "lodash"
9+
import { NEWSLETTER_SIGNUP_URL, TRAINING_CALENDAR_URL } from "../common"
910

1011
const HeroHeader = ({ authenticated }) => {
1112
const { t } = useTranslation("common")
@@ -59,7 +60,7 @@ const HeroHeader = ({ authenticated }) => {
5960
<p>
6061
{t("newcomer")}{" "}
6162
<a
62-
href="https://calendar.google.com/calendar/embed?src=998f62323926f0b0076e7f578d3ca72b1bc94c4efa2f24be57b11f52b1b88595%40group.calendar.google.com&ctz=America%2FNew_York"
63+
href={TRAINING_CALENDAR_URL}
6364
style={{ color: "white" }}
6465
target="_blank"
6566
rel="noopener noreferrer"
@@ -70,7 +71,7 @@ const HeroHeader = ({ authenticated }) => {
7071
</p>
7172
<p>
7273
<a
73-
href="https://cdn.forms-content.sg-form.com/d049f1ab-b547-11ee-9605-72ceb6b6e337"
74+
href={NEWSLETTER_SIGNUP_URL}
7475
style={{ color: "white" }}
7576
target="_blank"
7677
rel="noopener noreferrer"

components/Newsfeed/Newsfeed.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,16 +144,14 @@ export default function Newsfeed() {
144144
const [settingsModal, setSettingsModal] = useState<"show" | null>(null)
145145
const [notifications, setNotifications] = useState<
146146
"Weekly" | "Monthly" | "None"
147-
>(notificationFrequency ? notificationFrequency : "Monthly")
147+
>(notificationFrequency ? notificationFrequency : "Weekly")
148148
const [isProfilePublic, setIsProfilePublic] = useState<false | true>(
149149
isPublic ? isPublic : false
150150
)
151151

152152
const onSettingsModalOpen = () => {
153153
setSettingsModal("show")
154-
setNotifications(
155-
notificationFrequency ? notificationFrequency : "Monthly"
156-
)
154+
setNotifications(notificationFrequency ? notificationFrequency : "Weekly")
157155
setIsProfilePublic(isPublic ? isPublic : false)
158156
}
159157

@@ -230,6 +228,7 @@ export default function Newsfeed() {
230228
testimonyId={element.testimonyId}
231229
type={element.type}
232230
userRole={element.userRole}
231+
isNewsfeed={"enable newsfeed specific subheading"}
233232
/>
234233
</div>
235234
))}

components/NewsfeedCard/NewsfeedCard.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ export const NewsfeedCard = (props: {
2525
timestamp: Timestamp
2626
type: string
2727
userRole?: string
28+
isNewsfeed?: string
2829
}) => {
2930
const date = props.timestamp.toDate()
3031
const formattedTimestamp = `${date.toLocaleDateString()}`
@@ -40,6 +41,7 @@ export const NewsfeedCard = (props: {
4041
timestamp={formattedTimestamp}
4142
type={props.type}
4243
userRole={props.userRole}
44+
isNewsfeed={"enable newsfeed specific subheading"}
4345
/>
4446
)
4547

components/auth/TermsOfServiceModal.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { Button, Col, Modal, Row, Stack } from "../bootstrap"
33
import { External } from "components/links"
44
import { NavLink } from "../Navlink"
55
import { useTranslation } from "next-i18next"
6+
import { NEWSLETTER_SIGNUP_URL } from "components/common"
67

78
export default function TermsOfServiceModal({
89
show,
@@ -80,7 +81,7 @@ export default function TermsOfServiceModal({
8081
</Row>
8182
<Row>
8283
<NavLink
83-
href="https://cdn.forms-content.sg-form.com/d049f1ab-b547-11ee-9605-72ceb6b6e337"
84+
href={NEWSLETTER_SIGNUP_URL}
8485
other={{
8586
className: `text-center fs-5 mt-4 text-secondary`,
8687
target: "_blank",

components/auth/hooks.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export function useCreateUserWithEmailAndPassword(isOrg: boolean) {
7676
setProfile(credentials.user.uid, {
7777
fullName,
7878
orgCategories: categories,
79-
notificationFrequency: "Monthly",
79+
notificationFrequency: "Weekly",
8080
email: credentials.user.email
8181
}),
8282
sendEmailVerification(credentials.user)
@@ -85,7 +85,7 @@ export function useCreateUserWithEmailAndPassword(isOrg: boolean) {
8585
await Promise.all([
8686
setProfile(credentials.user.uid, {
8787
fullName,
88-
notificationFrequency: "Monthly",
88+
notificationFrequency: "Weekly",
8989
email: credentials.user.email,
9090
public: true
9191
}),
@@ -136,7 +136,7 @@ export function useSignInWithPopUp() {
136136
await Promise.all([
137137
setProfile(credentials.user.uid, {
138138
fullName: credentials.user.displayName ?? "New User",
139-
notificationFrequency: "Monthly",
139+
notificationFrequency: "Weekly",
140140
email: credentials.user.email,
141141
public: true
142142
})

components/common.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export const NEWSLETTER_SIGNUP_URL =
2+
"https://cdn.forms-content.sg-form.com/66e4c174-72e5-11f0-847b-fe4d8dd139cf"
3+
export const TRAINING_CALENDAR_URL =
4+
"https://calendar.google.com/calendar/embed?src=998f62323926f0b0076e7f578d3ca72b1bc94c4efa2f24be57b11f52b1b88595%40group.calendar.google.com&ctz=America%2FNew_York"

functions/src/notifications/deliverNotifications.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ const deliverEmailNotifications = async () => {
6666
}
6767

6868
// Temporarily using email from the profile to test the non-auth issues
69-
const verifiedEmail = profile.email //await getVerifiedUserEmail(profileDoc.id)
69+
const verifiedEmail = profile.email || profile.contactInfo?.publicEmail //await getVerifiedUserEmail(profileDoc.id)
7070
if (!verifiedEmail) {
7171
console.log(
7272
`Skipping user ${profileDoc.id} because they have no verified email address`

0 commit comments

Comments
 (0)