-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(ministry brands): handler in editor-client #1951
base: master
Are you sure you want to change the base?
Conversation
f1d557f
to
5b88d8c
Compare
@@ -50,6 +51,12 @@ const api = { | |||
searchCollectionItems, | |||
getCollectionItemsIds | |||
}, | |||
modules: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is really need to be inside modules
?
beause is simple api handlers like handlers for Shopify
import { Literal } from "utils/types"; | ||
import { t } from "../utils/i18n"; | ||
|
||
export const request = (url: string): Promise<EkklesiaResponse> => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use request
from editor-client/src/api/index.ts
}; | ||
|
||
export const fieldHaveParentsChildsKeys = ( | ||
key: Record<string, Literal> | EkklesiaParentsChilds |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe rename key
in something like keys
, because will be more readable and make short return
return "childs" in key && "parents" in key; | ||
}; | ||
|
||
export const keysHaveSubkey = ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make short return
|
||
export const getOption = ( | ||
obj: Record<string, Literal> | undefined | ||
): ChoicesSync => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make short return
title: String(value), | ||
value: key |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
key
should not be on title
?
and better use string reader for instead of String(value)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
export const getOption = ( | ||
obj: Record<string, Literal> | undefined | ||
): ChoicesSync => { | ||
return obj |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use Object reader
): Promise<ChoicesSync> => { | ||
const { key } = keys; | ||
|
||
const { data = {} } = await request(url.concat("?module=", key)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of url.concat("?module=", key)
use makeUrl
function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why file name is index.s.ts
?
4617569
to
1ee8f47
Compare
1ee8f47
to
b3d36fe
Compare
b3d36fe
to
428debf
Compare
952a694
to
436dcb3
Compare
436dcb3
to
27c021f
Compare
39805ed
to
4285f11
Compare
4285f11
to
d72af09
Compare
d72af09
to
2f209e3
Compare
2f209e3
to
c0206f4
Compare
c0206f4
to
0f98999
Compare
added extra to updateEkklesiaFields
0f98999
to
b555e1b
Compare
# Conflicts: # languages/brizy.pot
# Conflicts: # README.md # brizy.php # config.dev.php # config.php # languages/brizy.pot # readme.txt
Removed unused vars from Default Templates
# Conflicts: # brizy.php
# Conflicts: # composer.json # composer.lock
feat(lottie): added dotlottie player
# Conflicts: # editor/editor/editor.php # public/editor-client/src/config.ts # public/editor-client/src/index.ts
Related : https://github.com/bagrinsergiu/blox-editor/issues/24301