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

fix: display batch details in correct columns #322

Merged
merged 1 commit into from
Nov 21, 2024
Merged
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
15 changes: 7 additions & 8 deletions packages/app/src/components/batches/InfoTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ import useContext from "@/composables/useContext";
import type { BatchDetails } from "@/composables/useBatch";
import type { Component, PropType } from "vue";

import { arrayHalfDivider } from "@/utils/helpers";

const { t } = useI18n();
const { width: screenWidth } = useWindowSize();
const { currentNetwork } = useContext();
Expand Down Expand Up @@ -50,19 +48,20 @@ const tableInfoItems = computed(() => {
url?: string;
};

let tableItems: InfoTableItem[] = [
const tableItemsLeft: InfoTableItem[] = [
{
label: t("batches.index"),
tooltip: t("batches.indexTooltip"),
value: props.batchNumber,
},
];
const tableItemsRight: InfoTableItem[] = [];

if (!props.batch) {
return [tableItems];
return [tableItemsLeft];
}

tableItems.push(
tableItemsLeft.push(
{
label: t("batches.size"),
tooltip: t("batches.sizeTooltip"),
Expand All @@ -87,7 +86,7 @@ const tableInfoItems = computed(() => {
["executeTxHash", "executedAt", "notYetExecuted"],
] as [keyof BatchDetails, keyof BatchDetails, string][]) {
if (props.batch[key]) {
tableItems.push(
tableItemsRight.push(
{
label: t(`batches.${key}`),
tooltip: t(`batches.${key}Tooltip`),
Expand All @@ -108,10 +107,10 @@ const tableInfoItems = computed(() => {
}

if (screenWidth.value < 1024) {
return [tableItems];
return [tableItemsLeft.concat(tableItemsRight)];
}

return arrayHalfDivider(tableItems);
return [tableItemsLeft, tableItemsRight];
});
</script>

Expand Down
Loading