Skip to content

Commit

Permalink
Feedback forms
Browse files Browse the repository at this point in the history
  • Loading branch information
dooman87 committed Jan 1, 2025
1 parent b556d2b commit 76aceae
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 14 deletions.
8 changes: 4 additions & 4 deletions config/conference.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
Venue,
} from './types'
import { zonedTimeToUtc } from 'date-fns-tz'
import { add, set, toDate } from 'date-fns'
import { add, set } from 'date-fns'
import { MelbourneTownHall } from './venues/melbourne-town-hall'

const name = 'DDD Melbourne'
Expand All @@ -31,7 +31,7 @@ const presentationSubmissionsOpenUntil = zonedTimeToUtc('2024-11-01T23:59:59', t
const votingOpenFrom = zonedTimeToUtc('2024-11-08T00:00:00', tz)
const votingOpenUntil = zonedTimeToUtc('2024-11-20T23:59:59', tz)
const agendaPublishedFrom = zonedTimeToUtc('2024-11-30T09:00:00', tz)
const feedbackOpenFrom = toDate(date)
const feedbackOpenFrom = zonedTimeToUtc('2024-11-08T00:00:00', tz)
const feedbackOpenUntil = endDate
const importantDates: ImportantDate[] = [
{
Expand Down Expand Up @@ -138,8 +138,8 @@ const Conference: IConference = {
FeedbackOpenFrom: feedbackOpenFrom,
FeedbackOpenUntil: feedbackOpenUntil,

ConferenceFeedbackLink: 'https://forms.office.com/r/kSHPH4zqZ5',
SessionFeedbackLink: 'https://forms.office.com/r/kSHPH4zqZ5',
ConferenceFeedbackLink: '/conference-feedback',
SessionFeedbackLink: '/feedback',

HideDate: hideDate,
HideSponsors: false,
Expand Down
4 changes: 1 addition & 3 deletions pages/conference-feedback.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,7 @@ const ConferenceFeedback: NextPage = () => {
</h1>
<p>
If you would like to leave feedback for a session please use{' '}
<Link href={conference.SessionFeedbackLink}>
<a>the session feedback page</a>
</Link>
<Link href={conference.SessionFeedbackLink}>the session feedback page</Link>
</p>

<StyledForm onSubmit={handleSubmit}>
Expand Down
12 changes: 5 additions & 7 deletions pages/feedback.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ const Feedback: NextPage<FeedbackProps> = ({ sessions }) => {
const { deviceId } = useDeviceId(conference.Instance)
const { allSessionGroups, ...sessionGroups } = useSessionGroups(sessions)
const [formState, dispatch] = useReducer(formReducer, defaultFormState)
const hasPreviousSessions =
sessions && sessionGroups.previousSessionGroup && sessionGroups.previousSessionGroup.sessions.length > 0
const showForm = sessions && hasPreviousSessions
const hasPreviousSessions = true
// sessions && sessionGroups.previousSessionGroup && sessionGroups.previousSessionGroup.sessions.length > 0
const showForm = true //sessions && hasPreviousSessions

const formSubmitHandler = async () => {
dispatch('submitting')
Expand Down Expand Up @@ -99,9 +99,7 @@ const Feedback: NextPage<FeedbackProps> = ({ sessions }) => {
</h1>
<p>
If you would like to leave feedback about the conference please use{' '}
<Link href={conference.ConferenceFeedbackLink}>
<a>the conference feedback page</a>
</Link>
<Link href={conference.ConferenceFeedbackLink}>the conference feedback page</Link>
</p>

{sessions.length === 0 && (
Expand Down Expand Up @@ -132,7 +130,7 @@ const Feedback: NextPage<FeedbackProps> = ({ sessions }) => {
<StyledFormRow>
<StyledHeadingLabel>Which talk do you want to provide feedback for?</StyledHeadingLabel>
<StyledSessionList>
{sessionGroups.previousSessionGroup.sessions.flat().map((session) => (
{sessions.map((session) => (
<li key={session.Id}>
<SessionInput session={session} checked={values.sessionId === session.Id} onChange={handleChange} />
</li>
Expand Down

0 comments on commit 76aceae

Please sign in to comment.