Skip to content

Commit

Permalink
Hotfix/1.14.4 (#733)
Browse files Browse the repository at this point in the history
* fix: week start dates for the lm table

* update: tick version

* fix: proper start date
  • Loading branch information
arb000r authored Aug 24, 2021
1 parent 48a6bcb commit 5563390
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@balancer-labs/frontend-v2",
"version": "1.14.3",
"version": "1.14.4",
"engines": {
"node": "14.x",
"npm": ">=7"
Expand Down
9 changes: 6 additions & 3 deletions src/components/tables/LMTable/LMTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@
>
<div class="text-right flex flex-col">
<span>{{ getWeekName(week.week) }}</span>
<span class="text-xs">Starts {{ getWeekStart(i) }}</span>
<span class="text-xs"
>Starts {{ getWeekStart(weeks.length - i - 1) }}</span
>
</div>
</template>
<template v-slot:iconColumnCell="pool">
Expand Down Expand Up @@ -113,7 +115,7 @@ import useNumbers from '@/composables/useNumbers';
import { last, sum } from 'lodash';
import useDarkMode from '@/composables/useDarkMode';
import { isStableLike } from '@/composables/usePool';
import { startOfWeek, subWeeks, format } from 'date-fns';
import { startOfWeek, subWeeks, format, addDays } from 'date-fns';

function getWeekName(week: string) {
const parts = week.split('_');
Expand Down Expand Up @@ -223,7 +225,8 @@ export default defineComponent({

function getWeekStart(howManyWeeksToSubtract: number) {
return format(
startOfWeek(subWeeks(new Date(), howManyWeeksToSubtract)),
// startOfWeek is Sunday for date-fns
addDays(startOfWeek(subWeeks(new Date(), howManyWeeksToSubtract)), 1),
'dd/MM/yyyy'
);
}
Expand Down

3 comments on commit 5563390

@vercel
Copy link

@vercel vercel bot commented on 5563390 Aug 24, 2021

Choose a reason for hiding this comment

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

@vercel
Copy link

@vercel vercel bot commented on 5563390 Aug 24, 2021

Choose a reason for hiding this comment

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

@vercel
Copy link

@vercel vercel bot commented on 5563390 Aug 24, 2021

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 – ./

pm2.vercel.app
app-balancer.vercel.app
app.balancer.fi
app-git-master-balancer.vercel.app

Please sign in to comment.