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:
parent
a4a4ef4cd4
commit
10fde8c185
5 changed files with 5 additions and 6 deletions
|
@ -1,6 +1,6 @@
|
||||||
import { type ApplicationSignInExperience } from '@logto/schemas';
|
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
|
* Format the form data to match the API request body
|
||||||
|
|
|
@ -2,7 +2,7 @@ import { type Organization } from '@logto/schemas';
|
||||||
import { trySafe } from '@silverhand/essentials';
|
import { trySafe } from '@silverhand/essentials';
|
||||||
|
|
||||||
import { type Option } from '@/ds-components/Select/MultiSelect';
|
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 }> & {
|
export type FormData = Partial<Omit<Organization, 'customData'> & { customData: string }> & {
|
||||||
jitEmailDomains: string[];
|
jitEmailDomains: string[];
|
||||||
|
|
|
@ -7,7 +7,7 @@ import {
|
||||||
} from '@logto/schemas';
|
} from '@logto/schemas';
|
||||||
import { isSameArray } from '@silverhand/essentials';
|
import { isSameArray } from '@silverhand/essentials';
|
||||||
|
|
||||||
import { removeFalsyValues } from '@/utils/string';
|
import { removeFalsyValues } from '@/utils/object';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
type UpdateSignInExperienceData,
|
type UpdateSignInExperienceData,
|
||||||
|
|
2
packages/console/src/utils/object.ts
Normal file
2
packages/console/src/utils/object.ts
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
export const removeFalsyValues = (object: Record<string, unknown>) =>
|
||||||
|
Object.fromEntries(Object.entries(object).filter(([, value]) => value));
|
|
@ -1,4 +1 @@
|
||||||
export const decapitalize = (value: string) => value.charAt(0).toLowerCase() + value.slice(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));
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue