0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-01-27 21:39:16 -05:00

refactor(console): rename file

This commit is contained in:
Gao Sun 2024-07-10 14:32:46 +08:00
parent a4a4ef4cd4
commit 10fde8c185
No known key found for this signature in database
GPG key ID: 13EBE123E4773688
5 changed files with 5 additions and 6 deletions

View file

@ -1,6 +1,6 @@
import { type ApplicationSignInExperience } from '@logto/schemas';
import { removeFalsyValues } from '@/utils/string';
import { removeFalsyValues } from '@/utils/object';
/**
* Format the form data to match the API request body

View file

@ -2,7 +2,7 @@ import { type Organization } from '@logto/schemas';
import { trySafe } from '@silverhand/essentials';
import { type Option } from '@/ds-components/Select/MultiSelect';
import { removeFalsyValues } from '@/utils/string';
import { removeFalsyValues } from '@/utils/object';
export type FormData = Partial<Omit<Organization, 'customData'> & { customData: string }> & {
jitEmailDomains: string[];

View file

@ -7,7 +7,7 @@ import {
} from '@logto/schemas';
import { isSameArray } from '@silverhand/essentials';
import { removeFalsyValues } from '@/utils/string';
import { removeFalsyValues } from '@/utils/object';
import {
type UpdateSignInExperienceData,

View file

@ -0,0 +1,2 @@
export const removeFalsyValues = (object: Record<string, unknown>) =>
Object.fromEntries(Object.entries(object).filter(([, value]) => value));

View file

@ -1,4 +1 @@
export const decapitalize = (value: string) => value.charAt(0).toLowerCase() + value.slice(1);
export const removeFalsyValues = (object: Record<string, unknown>) =>
Object.fromEntries(Object.entries(object).filter(([, value]) => value));