Skip to content
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
7a3a55c
initial commit
mertbagt Aug 7, 2025
1eedc9f
retrieve data
mertbagt Aug 9, 2025
949575b
hearing title
mertbagt Aug 10, 2025
44ea709
error handling
mertbagt Aug 10, 2025
ae13ee5
refactor async function
mertbagt Aug 10, 2025
6718832
added state variable
mertbagt Aug 10, 2025
c99bdba
Merge branch 'main' of https://github.com/codeforboston/maple into he…
mertbagt Aug 10, 2025
fc9fb89
resolved title error
mertbagt Aug 10, 2025
c24b97e
basic state vars
mertbagt Aug 10, 2025
98280a2
useEffect
mertbagt Aug 10, 2025
9256787
committee tag
mertbagt Aug 11, 2025
3779b97
dynamic routes
mertbagt Aug 11, 2025
2852fc7
cleanup
mertbagt Aug 11, 2025
317f8b5
columns
mertbagt Aug 11, 2025
0536486
disclaimer
mertbagt Aug 11, 2025
5bb9eda
responsive iframes
mertbagt Aug 12, 2025
a60a9a8
replace iframes with video
mertbagt Aug 12, 2025
8230873
cleanup
mertbagt Aug 12, 2025
45f7373
cleanup2
mertbagt Aug 12, 2025
866ac01
cleanup3
mertbagt Aug 12, 2025
1aba5b4
updated h1
mertbagt Aug 12, 2025
094a940
Merge branch 'main' of https://github.com/codeforboston/maple into he…
mertbagt Aug 12, 2025
b8af3fd
cleanup
mertbagt Aug 13, 2025
e1a5ddb
transcriptions query
mertbagt Aug 14, 2025
d14e6e1
transcription data firestore
mertbagt Aug 14, 2025
77fd1bf
working on firestore
mertbagt Aug 14, 2025
9bd74c0
cleanup
mertbagt Aug 14, 2025
aeb594a
cleanup
mertbagt Aug 14, 2025
af6d66f
alternate bad code filtering
mertbagt Aug 14, 2025
0b15532
alt zod attempt
mertbagt Aug 14, 2025
f4904b8
reinstated videoURL sanity check
mertbagt Aug 14, 2025
0f8edf3
zod attempt 3
mertbagt Aug 14, 2025
b05debf
transcriptions feed initial wiring
mertbagt Aug 14, 2025
a750f0f
basic columns
mertbagt Aug 14, 2025
adcbf39
cleanup
mertbagt Aug 14, 2025
8f95b46
cleanup
mertbagt Aug 14, 2025
95b25b3
Merge branch 'main' of https://github.com/codeforboston/maple into he…
mertbagt Aug 14, 2025
aae9e4d
handle transcription not on file
mertbagt Aug 18, 2025
863a906
resolve conflicts
mertbagt Aug 18, 2025
ac411b6
click timestamp -> seek video currentTime
mertbagt Aug 18, 2025
489f8bf
end stamp
mertbagt Aug 18, 2025
b5d4033
timestamp button
mertbagt Aug 18, 2025
ccddcde
format milliseconds
mertbagt Aug 18, 2025
8c1fe92
added element end to timestamp button
mertbagt Aug 18, 2025
7b513a3
remove end timestamp
mertbagt Aug 18, 2025
ad59af2
alternating background colors
mertbagt Aug 19, 2025
d440ab4
cleanup
mertbagt Aug 19, 2025
7adc0b1
sidebar
mertbagt Aug 19, 2025
6a8d74d
sidebar chairmembers
mertbagt Aug 19, 2025
0ca12d0
error container
mertbagt Aug 19, 2025
dd93435
cleanup
mertbagt Aug 19, 2025
0fa7d14
remove obsolete console logs
mertbagt Aug 19, 2025
d9f2b8f
replaced 404 redirect with messaging for scheduled hearings that don'…
mertbagt Aug 20, 2025
6b00924
removed redirect code
mertbagt Aug 20, 2025
de77372
added feature flagging
mertbagt Aug 20, 2025
e476506
members
mertbagt Aug 20, 2025
4827dd6
reused committee button for show more clickable
mertbagt Aug 20, 2025
4e9f3cf
sidebar bottom
mertbagt Aug 20, 2025
2cb1366
removed attempt at using agenda
mertbagt Aug 20, 2025
aaa8078
cleanup
mertbagt Aug 20, 2025
ecec89a
remove event.ts change
mertbagt Aug 21, 2025
e1fe029
eventId
mertbagt Aug 21, 2025
45a4f96
removed styledcontainer
mertbagt Aug 21, 2025
aac82fb
refactored video with useRef
mertbagt Aug 21, 2025
cc301f3
removed inline style
mertbagt Aug 21, 2025
b150735
reassert eventId fix
mertbagt Aug 21, 2025
bd76247
removed Default Values
mertbagt Aug 21, 2025
6060c34
prevent FirebaseError
mertbagt Aug 21, 2025
2938830
cleanup
mertbagt Aug 21, 2025
e9cba43
cleanup
mertbagt Aug 21, 2025
2e7d481
updated even rows
mertbagt Aug 21, 2025
0ba52e0
uped cache control values
mertbagt Aug 21, 2025
b06f11e
moved page specific translations to hearing.json
mertbagt Aug 21, 2025
9d1ee2f
handle Invalid Date
mertbagt Aug 21, 2025
5548285
reduced cache control
mertbagt Aug 21, 2025
afb59d9
update useTranslation(filenames)
mertbagt Aug 21, 2025
462b494
reinstate week long cache control
mertbagt Aug 21, 2025
5402c6c
remove console log
mertbagt Aug 21, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions components/hearing/HearingDetails.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import {
collection,
doc,
getDoc,
getDocs,
orderBy,
query
} from "firebase/firestore"
import { useTranslation } from "next-i18next"
import { useCallback, useEffect, useRef, useState } from "react"
import styled from "styled-components"
import { Col, Container, Image, Row } from "../bootstrap"
import { firestore } from "components/firebase"

const StyledContainer = styled(Container)`
font-family: "Nunito";
`

export const HearingDetails = () => {
const { t } = useTranslation("common")
const hearingId = "hearing-5180"

const [committeeName, setCommitteeName] = useState("")
const [videoTranscriptionId, setVideoTranscriptionId] = useState("")
const [videoURL, setVideoURL] = useState("")

const hearingData = useCallback(async () => {
const hearing = await getDoc(doc(firestore, `events/${hearingId}`))
const docData = hearing.data()
const content = docData?.content ?? "Default Content"

setCommitteeName(content.Name)
setVideoTranscriptionId(
docData?.videoTranscriptionId ?? "Default Video Transcripton Id"
)
setVideoURL(docData?.videoURL ?? "Default URL")

console.log("data: ", docData)
console.log("content: ", content)
}, [])

useEffect(() => {
hearingData()
}, [hearingData])

console.log("Committee: ", committeeName)
console.log("Id: ", videoTranscriptionId)
console.log("url: ", videoURL)

return (
<StyledContainer className="mt-3 mb-3">
<h1>{t("hearing_transcription")}</h1>
<>Hello Hearing World, {videoURL}</>
</StyledContainer>
)
}
2 changes: 1 addition & 1 deletion next-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information.
// see https://nextjs.org/docs/basic-features/typescript for more information.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure where this edit came from

both versions of the url seem to go to the same document

16 changes: 16 additions & 0 deletions pages/hearing/1.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { HearingDetails } from "components/hearing/HearingDetails"
import { createPage } from "../../components/page"
import { createGetStaticTranslationProps } from "components/translations"

export default createPage({
titleI18nKey: "Hearing",
Page: () => {
return <HearingDetails />
}
})

export const getStaticProps = createGetStaticTranslationProps([
"auth",
"common",
"footer"
])
1 change: 1 addition & 0 deletions public/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"followed": "Followed"
},
"calendar": "Our Calendar",
"hearing_transcription": "Hearing Transcription",
"hideAns": "Hide Answer",
"joinTraining": "and join an upcoming training session!",
"learn": "Learn",
Expand Down