Revert "Add student birthday tracking with celebration banners and admin notification; v1.1.31"
This reverts commit c0a79b9ed0.
This commit is contained in:
@@ -23,7 +23,6 @@ type StudyAuthState = {
|
||||
totpEnabled?: boolean
|
||||
twoFaMethod?: 'app' | 'email' | null
|
||||
totpRecoveryCodesRemaining?: number
|
||||
isBirthdayWeek?: boolean
|
||||
}
|
||||
|
||||
type StudyAuthStatusResponse = {
|
||||
@@ -37,7 +36,6 @@ type StudyAuthStatusResponse = {
|
||||
totpEnabled?: boolean
|
||||
twoFaMethod?: 'app' | 'email' | null
|
||||
totpRecoveryCodesRemaining?: number
|
||||
isBirthdayWeek?: boolean
|
||||
}
|
||||
|
||||
type StudyAccountOverview = {
|
||||
@@ -1260,10 +1258,6 @@ export function ColossiansStudyIndexPage({ content }: Props) {
|
||||
const [enrollMessage, setEnrollMessage] = useState('')
|
||||
const [studyProgress, setStudyProgress] = useState<StudyProgress>({ completedSectionIds: [] })
|
||||
const [progressLoading, setProgressLoading] = useState(false)
|
||||
const [birthdayBannerDismissed, setBirthdayBannerDismissed] = useState(() => {
|
||||
const yr = new Date().getFullYear()
|
||||
return localStorage.getItem(`birthday-banner-dismissed-${yr}`) === '1'
|
||||
})
|
||||
|
||||
useEffect(() => {
|
||||
let cancelled = false
|
||||
@@ -1274,9 +1268,7 @@ export function ColossiansStudyIndexPage({ content }: Props) {
|
||||
checked: true,
|
||||
authenticated: Boolean(data.authenticated),
|
||||
username: data.username ?? '',
|
||||
displayName: data.displayName ?? '',
|
||||
enrolledStudySlugs: normalizeEnrolledStudySlugs(data.enrolledStudySlugs),
|
||||
isBirthdayWeek: data.isBirthdayWeek === true,
|
||||
})
|
||||
})
|
||||
.catch(() => {
|
||||
@@ -1359,19 +1351,6 @@ export function ColossiansStudyIndexPage({ content }: Props) {
|
||||
|
||||
return (
|
||||
<main className="study-index-page" aria-label={`${study.title} study`}>
|
||||
{auth.authenticated && auth.isBirthdayWeek && !birthdayBannerDismissed && (
|
||||
<div role="alert" style={{ background: 'linear-gradient(135deg, #fffbe6 0%, #fff3cc 100%)', borderBottom: '2px solid #f0c930', padding: '0.9rem 1.25rem', display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: '1rem', flexWrap: 'wrap' }}>
|
||||
<span style={{ fontSize: '1.05rem', color: '#7a5800' }}>
|
||||
🎂 <strong>Happy Birthday{auth.displayName ? `, ${auth.displayName}` : ''}!</strong> Wishing you a wonderful birthday week — we're so glad you're part of this study community. 🎉
|
||||
</span>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => { setBirthdayBannerDismissed(true); localStorage.setItem(`birthday-banner-dismissed-${new Date().getFullYear()}`, '1') }}
|
||||
aria-label="Dismiss birthday banner"
|
||||
style={{ background: 'none', border: 'none', cursor: 'pointer', color: '#7a5800', fontSize: '1.1rem', lineHeight: 1, padding: '0.2rem 0.4rem', borderRadius: '3px' }}
|
||||
>✕</button>
|
||||
</div>
|
||||
)}
|
||||
<section className="section-study-course-hero">
|
||||
<div className="section-inner study-course-hero-inner">
|
||||
<Breadcrumbs items={[{ label: 'Home', href: '/' }, { label: 'Studies', href: '/study' }, { label: study.title }]} />
|
||||
|
||||
Reference in New Issue
Block a user