mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2026-07-30 10:30:16 +00:00
Update error handling and clean up imports in StandardCardGroupSection and helpers
- Changed console warning to error for better visibility when no cards are provided in StandardCardGroupSection. - Simplified imports in helpers by removing unused React types to enhance code clarity.
This commit is contained in:
committed by
Calvin Jhunjhuwala
parent
f1d5c05c78
commit
ce77be21a4
@@ -67,7 +67,7 @@ export const StandardCardGroupSection = React.forwardRef<
|
||||
// Early return for empty cards array
|
||||
if (cards.length === 0) {
|
||||
if (isEnvironment("development")) {
|
||||
console.warn("StandardCardGroupSection: No cards provided");
|
||||
console.error("StandardCardGroupSection: No cards provided");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
import React, {
|
||||
isValidElement,
|
||||
type ReactElement,
|
||||
type ReactNode,
|
||||
} from "react";
|
||||
import React from "react";
|
||||
|
||||
/**
|
||||
* Valid Node.js environment values
|
||||
|
||||
Reference in New Issue
Block a user