chore: codify React component style
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
import type { BrokerageAccount } from "../api/useBrokerageAccounts";
|
||||
|
||||
export function accountTypeKey(type: BrokerageAccount["type"]) {
|
||||
function accountTypeKey(type: BrokerageAccount["type"]) {
|
||||
return `accounts.types.${type}` as const;
|
||||
}
|
||||
|
||||
export function errorCode(error: unknown): string | undefined {
|
||||
function errorCode(error: unknown): string | undefined {
|
||||
return typeof error === "object" && error !== null && "code" in error
|
||||
? String(error.code)
|
||||
: undefined;
|
||||
}
|
||||
|
||||
export { accountTypeKey, errorCode };
|
||||
|
||||
Reference in New Issue
Block a user