Skip to content

Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.

🧼 Cleaning up unused code and translations

Luke Vella5bbc7248bf40
diff --git a/apps/landing/public/locales/en/app.json b/apps/landing/public/locales/en/app.json
index d229a1cf5..7de620207 100644
--- a/apps/landing/public/locales/en/app.json
+++ b/apps/landing/public/locales/en/app.json
@@ -48,7 +48,6 @@
"getStartedHint": "Create a poll. It's free. No login required.",
"homepage_readDocs": "Read the docs",
"goToApp": "Go to app",
- "yes": "Yes",
- "ifNeedBe": "If need be",
- "no": "No"
+ "blogTitle": "Rallly - Blog",
+ "blogDescription": "News, updates and announcement about Rallly."
}
diff --git a/apps/web/public/locales/en/app.json b/apps/web/public/locales/en/app.json
index b68c5377b..b21d1ad9d 100644
--- a/apps/web/public/locales/en/app.json
+++ b/apps/web/public/locales/en/app.json
@@ -151,11 +151,6 @@
"finishPoll": "Finalize",
"finalize": "Finalize",
"allDay": "All day",
- "poll": {
- "date": "Date"
- },
- "duration": "Duration",
- "popularity": "Popularity",
"permissionDenied": "Unauthorized",
"permissionDeniedDescription": "Log in to view this poll.",
"goToHome": "Go to polls",
diff --git a/apps/web/src/components/dates-table.tsx b/apps/web/src/components/dates-table.tsx
deleted file mode 100644
index 0f68f48bd..000000000
--- a/apps/web/src/components/dates-table.tsx
+++ /dev/null
@@ -1,137 +0,0 @@
-import { ClockIcon } from "@rallly/icons";
-import { cn } from "@rallly/ui";
-import {
- createColumnHelper,
- flexRender,
- getCoreRowModel,
- useReactTable,
-} from "@tanstack/react-table";
-import dayjs from "dayjs";
-import React from "react";
-import { Trans } from "react-i18next";
-
-import { DateIcon } from "@/components/date-icon";
-import { useParticipants } from "@/components/participants-provider";
-import { VoteSummaryProgressBar } from "@/components/vote-summary-progress-bar";
-
-type DateOption = {
- id: string;
- start: Date;
- duration: number;
- votes: {
- yes: string[];
- ifNeedBe: string[];
- no: string[];
- };
-};
-const optionColumnHelper = createColumnHelper<DateOption>();
-
-export const DatesTable = (props: {
- data: DateOption[];
- className?: string;
-}) => {
- const { participants } = useParticipants();
- const table = useReactTable<DateOption>({
- data: props.data,
- columns: [
- optionColumnHelper.accessor("start", {
- header: () => <Trans i18nKey="poll.date" defaults="Date" />,
- size: 90,
- cell: (info) =>
- info.row.original.duration ? (
- <div className="flex items-center gap-2 whitespace-nowrap font-semibold tabular-nums">
- <ClockIcon className="h-5" />
- {dayjs(info.getValue()).format("LT")}
- </div>
- ) : (
- <DateIcon date={dayjs(info.getValue())} />
- ),
- }),
- optionColumnHelper.accessor("duration", {
- id: "duration",
- size: 120,
- header: () => <Trans i18nKey="duration" defaults="Duration" />,
- cell: (info) => (
- <div className="flex items-center gap-2 whitespace-nowrap text-gray-500">
- <ClockIcon className="h-5" />
- {info.getValue() ? (
- dayjs.duration(info.getValue(), "minutes").humanize()
- ) : (
- <Trans i18nKey="allDay" defaults="All-day" />
- )}
- </div>
- ),
- }),
- optionColumnHelper.accessor("votes", {
- id: "popularity",
- header: () => <Trans defaults="Popularity" i18nKey="popularity" />,
- size: 300,
- cell: (info) => {
- return (
- <div className="min-w-[100px]">
- <VoteSummaryProgressBar
- {...info.getValue()}
- total={participants.length}
- />
- </div>
- );
- },
- }),
-
- // optionColumnHelper.display({
- // id: "participants",
- // size: 100,
- // header: () => <Trans defaults="Participants" i18nKey="participants" />,
- // cell: (info) => {
- // return (
- // <ParticipantAvatarBar
- // participants={responses.filter((response) => {
- // return scoreByOptionId[info.row.original.id].yes.includes(
- // response.id,
- // );
- // })}
- // max={5}
- // />
- // );
- // },
- // }),
- ],
- getCoreRowModel: getCoreRowModel(),
- initialState: {
- grouping: ["group"],
- columnVisibility: { group: false },
- expanded: true,
- },
- });
-
- return (
- <div className={cn("rounded-md border", props.className)}>
- <table className={cn("w-full table-auto border-collapse bg-white")}>
- <tbody>
- {table.getRowModel().rows.map((row, i) => {
- return (
- <tr key={row.id}>
- {row.getVisibleCells().map((cell) => (
- <td
- key={cell.id}
- className={cn(
- "overflow-hidden border-gray-100 px-2.5 py-2.5",
- {
- "border-b ": table.getRowModel().rows.length !== i + 1,
- },
- )}
- style={{
- width: cell.column.getSize(),
- }}
- >
- {flexRender(cell.column.columnDef.cell, cell.getContext())}
- </td>
- ))}
- </tr>
- );
- })}
- </tbody>
- </table>
- </div>
- );
-};