Skip to content
This repository was archived by the owner on May 13, 2024. It is now read-only.

Commit c11e9f1

Browse files
Hubert KosterHubert Koster
authored andcommitted
chore: fixing markup
1 parent 4488a6d commit c11e9f1

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

src/features/dashboard/components/Dialogs/UpdateAppDialog/index.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,10 @@ const UpdateAppDialog = ({ app, onClose }: IUpdateAppDialog) => {
4646
const onSubmit = useCallback(
4747
(data: IRegisterAppForm) => {
4848
const { name, redirect_uri, verification_uri, app_markup_percentage } = data;
49-
const is_demo_account = currentLoginAccount.name.includes('VRTC');
5049

5150
const has_redirect_uri = redirect_uri !== '' && { redirect_uri };
5251
const has_verification_uri = verification_uri !== '' && { verification_uri };
53-
const can_have_markup = !is_demo_account && {
52+
const markup = {
5453
app_markup_percentage: Number(app_markup_percentage),
5554
};
5655

@@ -66,7 +65,7 @@ const UpdateAppDialog = ({ app, onClose }: IUpdateAppDialog) => {
6665
name,
6766
...has_redirect_uri,
6867
...has_verification_uri,
69-
...can_have_markup,
68+
...markup,
7069
scopes: selectedScopes,
7170
});
7271
},

src/features/dashboard/register-app/index.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,16 @@ import useAuthContext from '@site/src/hooks/useAuthContext';
99

1010
const AppRegistration = () => {
1111
const { send: registerApp, error, clear, data } = useWS('app_register');
12-
const { currentLoginAccount } = useAuthContext();
12+
const { loginAccounts } = useAuthContext();
1313
const [form_is_cleared, setFormIsCleared] = useState(false);
1414

1515
const onSubmit = useCallback(
1616
(data: IRegisterAppForm) => {
1717
const { name, redirect_uri, verification_uri, app_markup_percentage } = data;
18-
const is_demo_account = currentLoginAccount.name.includes('VRTC');
1918

2019
const has_redirect_uri = redirect_uri !== '' && { redirect_uri };
2120
const has_verification_uri = verification_uri !== '' && { verification_uri };
22-
const can_have_markup = !is_demo_account && {
21+
const markup = {
2322
app_markup_percentage: Number(app_markup_percentage),
2423
};
2524

@@ -34,7 +33,7 @@ const AppRegistration = () => {
3433
name,
3534
...has_redirect_uri,
3635
...has_verification_uri,
37-
...can_have_markup,
36+
...markup,
3837
scopes: selectedScopes,
3938
});
4039
setFormIsCleared(true);

0 commit comments

Comments
 (0)