diff --git a/apps/dashboard/src/components/charts/chart-period.tsx b/apps/dashboard/src/components/charts/chart-period.tsx index e185c66f76..29f426ba84 100644 --- a/apps/dashboard/src/components/charts/chart-period.tsx +++ b/apps/dashboard/src/components/charts/chart-period.tsx @@ -9,15 +9,15 @@ import { format } from "date-fns"; import { useAction } from "next-safe-action/hook"; import { parseAsString, useQueryStates } from "next-usequerystate"; -export function ChartPeriod({ initialValue, defaultValue, disabled }) { +export function ChartPeriod({ defaultValue, value, disabled }) { let placeholder; const { execute } = useAction(changeChartPeriodAction); const [state, setState] = useQueryStates( { - from: parseAsString.withDefault(initialValue?.from ?? undefined), - to: parseAsString.withDefault(initialValue?.to ?? undefined), + from: parseAsString.withDefault(value?.from || defaultValue?.from), + to: parseAsString.withDefault(value?.to || defaultValue?.to), }, { shallow: false, diff --git a/apps/dashboard/src/components/charts/chart-selectors.tsx b/apps/dashboard/src/components/charts/chart-selectors.tsx index c35037f455..cbe5181f2e 100644 --- a/apps/dashboard/src/components/charts/chart-selectors.tsx +++ b/apps/dashboard/src/components/charts/chart-selectors.tsx @@ -9,7 +9,7 @@ export async function ChartSelectors({ value, defaultValue }) { return (
- +
); } diff --git a/apps/dashboard/src/components/team-menu.tsx b/apps/dashboard/src/components/team-menu.tsx index e5cfb937fb..041586d8f6 100644 --- a/apps/dashboard/src/components/team-menu.tsx +++ b/apps/dashboard/src/components/team-menu.tsx @@ -46,7 +46,7 @@ export async function TeamMenu() { - Create team + Create team @@ -75,7 +75,7 @@ export async function TeamMenu() { return (
-
+
@@ -85,7 +85,7 @@ export async function TeamMenu() { - {team.name} + {team.name}
{team.id === userData.team.id && }
diff --git a/packages/ui/src/components/month-range-picker.tsx b/packages/ui/src/components/month-range-picker.tsx index fa540dc713..58b8c91c4b 100644 --- a/packages/ui/src/components/month-range-picker.tsx +++ b/packages/ui/src/components/month-range-picker.tsx @@ -5,7 +5,6 @@ import { ChevronLeft, ChevronRight } from "lucide-react"; import React, { useState } from "react"; import { cn } from "../utils"; import { Button } from "./button"; -import { buttonVariants } from "./button"; const monthsNumber = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]; @@ -109,26 +108,35 @@ export const MonthRangePicker = ({ date, setDate }: Props) => { const isRange = isSelected && !isSelectedDate; return ( - +
+ + {new Intl.DateTimeFormat("en-US", { month: "short" }).format( + monthStart + )} + +
+ ); }; @@ -163,10 +171,10 @@ export const MonthRangePicker = ({ date, setDate }: Props) => {
-
+
{renderYear(today.getFullYear() + yearOffset)}
-
+
{renderYear(today.getFullYear() + yearOffset + 1)}