Skip to content

Commit

Permalink
✨ Include email address and year in csv exporter
Browse files Browse the repository at this point in the history
  • Loading branch information
lukevella committed Oct 27, 2023
1 parent b10c64b commit 692068b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions apps/web/src/components/poll/manage-poll/use-csv-exporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@ export const useCsvExporter = () => {
return {
exportToCsv: () => {
const header = [
t("participantCount", {
count: participants.length,
}),
t("name"),
t("email"),
...options.map((decodedOption) => {
const day = `${decodedOption.dow} ${decodedOption.day} ${decodedOption.month}`;
const day = `${decodedOption.dow} ${decodedOption.day} ${decodedOption.month} ${decodedOption.year}`;
return decodedOption.type === "date"
? day
: `${day} ${decodedOption.startTime} - ${decodedOption.endTime}`;
Expand All @@ -27,6 +26,7 @@ export const useCsvExporter = () => {
const rows = participants.map((participant) => {
return [
participant.name,
participant.email,
...poll.options.map((option) => {
const vote = participant.votes.find((vote) => {
return vote.optionId === option.id;
Expand Down

1 comment on commit 692068b

@vercel
Copy link

@vercel vercel bot commented on 692068b Oct 27, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

app – ./

rallly-vert.vercel.app
app-git-main-rallly.vercel.app
app-rallly.vercel.app
app.rallly.co

Please sign in to comment.