Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rename vote items to vote options #751

Merged
merged 1 commit into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 0 additions & 6 deletions packages/berlin/src/components/cycles/Cycles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@ type CyclesProps = {
function Cycles({ cycles, eventId, fallback }: CyclesProps) {
const navigate = useNavigate();

const formatDate = (date: string) => {
const eventEndDate = new Date(date);
return new Intl.DateTimeFormat('en-US', { month: 'long', day: 'numeric' }).format(eventEndDate);
};

const handleCycleClick = (cycleId: string) => {
navigate(`/events/${eventId}/cycles/${cycleId}`);
};
Expand All @@ -36,7 +31,6 @@ function Cycles({ cycles, eventId, fallback }: CyclesProps) {
onClick={() => handleCycleClick(cycle.id)}
>
<Body>{cycle?.questions[0]?.title}</Body>
<Body>{formatDate(cycle.endAt)}</Body>
</article>
))
) : (
Expand Down
2 changes: 1 addition & 1 deletion packages/berlin/src/pages/Cycle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
toast('Agenda has closed. Redirecting to results.');
navigate(`/events/${eventId}/cycles/${cycleId}/results`);
}
}, [cycle?.status]);

Check warning on line 91 in packages/berlin/src/pages/Cycle.tsx

View workflow job for this annotation

GitHub Actions / Check linting

React Hook useEffect has missing dependencies: 'cycleId', 'eventId', and 'navigate'. Either include them or remove the dependency array

useEffect(() => {
if (cycle && cycle.startAt && cycle.endAt) {
Expand Down Expand Up @@ -326,7 +326,7 @@
{currentCycle?.options.length ? (
<FlexColumn>
<div className="flex w-full items-center justify-between">
<Subtitle>Vote items</Subtitle>
<Subtitle>Vote options</Subtitle>
<div className="flex cursor-pointer items-center gap-2">
<Body>Sort</Body>
<DropdownMenu>
Expand Down
Loading