Skip to content

Commit

Permalink
Update period in column chart (#673)
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelfact authored Nov 20, 2024
1 parent a7fb7c3 commit 0aa7b7b
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export function FinancialColumnChart() {
const dateKernelPort = bootstrap.getDateKernelPort();
const moneyKernelPort = bootstrap.getMoneyKernelPort();
const { sponsorId = "" } = useParams<{ sponsorId: string }>();
const [rangeType, setRangeType] = useState<DateRangeType>(DateRangeType.LAST_WEEK);
const [rangeType, setRangeType] = useState<DateRangeType>(DateRangeType.LAST_YEAR);

const { fromDate, toDate } = useMemo(() => {
const { from, to } = dateKernelPort.getRangeOfDates(rangeType);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export function FinancialColumnChart() {
const dateKernelPort = bootstrap.getDateKernelPort();
const moneyKernelPort = bootstrap.getMoneyKernelPort();
const { projectSlug = "" } = useParams<{ projectSlug: string }>();
const [rangeType, setRangeType] = useState<DateRangeType>(DateRangeType.LAST_WEEK);
const [rangeType, setRangeType] = useState<DateRangeType>(DateRangeType.LAST_YEAR);

const { fromDate, toDate } = useMemo(() => {
const { from, to } = dateKernelPort.getRangeOfDates(rangeType);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import { useFinancialColumnChart } from "./financial-column-chart.hooks";
export function FinancialColumnChart() {
const { t } = useTranslation();

const [rangeType, setRangeType] = useState<DateRangeType>(DateRangeType.LAST_WEEK);
const [rangeType, setRangeType] = useState<DateRangeType>(DateRangeType.LAST_YEAR);

const rangeMenu = useRangeSelectOptions();
const { githubUserId } = useAuthUser();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export function FinancialColumnChart() {
const dateKernelPort = bootstrap.getDateKernelPort();
const moneyKernelPort = bootstrap.getMoneyKernelPort();
const { programId = "" } = useParams<{ programId: string }>();
const [rangeType, setRangeType] = useState<DateRangeType>(DateRangeType.LAST_WEEK);
const [rangeType, setRangeType] = useState<DateRangeType>(DateRangeType.LAST_YEAR);

const { fromDate, toDate } = useMemo(() => {
const { from, to } = dateKernelPort.getRangeOfDates(rangeType);
Expand Down
2 changes: 1 addition & 1 deletion shared/panels/project-sidepanel/project-sidepanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export function ProjectSidepanel() {
canGoBack = false,
} = useSinglePanelData<ProjectSidePanelData>(name) ?? { projectId: "" };
const dateKernelPort = bootstrap.getDateKernelPort();
const [rangeType, setRangeType] = useState<DateRangeType>(DateRangeType.LAST_WEEK);
const [rangeType, setRangeType] = useState<DateRangeType>(DateRangeType.LAST_YEAR);

const { fromDate, toDate } = useMemo(() => {
const { from, to } = dateKernelPort.getRangeOfDates(rangeType);
Expand Down

0 comments on commit 0aa7b7b

Please sign in to comment.