refactor: clean up code formatting and improve readability across multiple components
- Standardized the use of quotes and spacing in various files. - Removed unnecessary line breaks and trailing spaces in components. - Improved the structure of computed properties and methods for better clarity. - Enhanced the consistency of prop definitions and emit events in Vue components. - Updated the GraphQL composable to streamline error handling and data processing. - Refactored network configuration files for better organization and readability. - Cleaned up model files by removing redundant lines and ensuring consistent formatting. - Adjusted router configuration for improved readability. - Enhanced utility functions for better maintainability and clarity.
This commit is contained in:
@@ -29,7 +29,8 @@ const eventName = computed(() => {
|
||||
});
|
||||
|
||||
const explorerName = computed(() => {
|
||||
return Networks[(props.networkName as string).toLowerCase()].blockExplorers?.default.name;
|
||||
return Networks[(props.networkName as string).toLowerCase()].blockExplorers
|
||||
?.default.name;
|
||||
});
|
||||
|
||||
const statusType = computed((): StatusType => {
|
||||
@@ -58,16 +59,16 @@ const showContinueButton = computed(() => {
|
||||
|
||||
const formattedDate = computed(() => {
|
||||
if (!props.transaction.blockTimestamp) return "";
|
||||
|
||||
|
||||
const timestamp = props.transaction.blockTimestamp;
|
||||
const date = new Date(timestamp * 1000);
|
||||
|
||||
|
||||
const day = String(date.getDate()).padStart(2, "0");
|
||||
const month = String(date.getMonth() + 1).padStart(2, "0");
|
||||
const year = date.getFullYear();
|
||||
const hours = String(date.getHours()).padStart(2, "0");
|
||||
const minutes = String(date.getMinutes()).padStart(2, "0");
|
||||
|
||||
|
||||
return `${day}/${month}/${year} ${hours}:${minutes}`;
|
||||
});
|
||||
|
||||
@@ -142,4 +143,3 @@ const handleExplorerClick = () => {
|
||||
@apply rounded-lg border-amber-300 border-2 px-3 py-2 text-gray-900 font-semibold sm:text-base text-xs hover:bg-transparent w-full text-center;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user