MCPcopy Create free account
hub / github.com/Linen-dev/linen.dev / updateAccount

Function updateAccount

apps/web/ui/BrandingView/index.tsx:66–86  ·  view source on GitHub ↗
(options?: any)

Source from the content-addressed store, hash-verified

64 }
65
66 const updateAccount = async (options?: any) => {
67 const form = document.getElementById('branding-form') as HTMLFormElement;
68 if (!form) {
69 return;
70 }
71 const googleAnalyticsId = form.googleAnalyticsId?.value;
72 const brandColor = form.brandColor.value;
73 const description = form.description.value;
74 const params = {
75 description,
76 brandColor,
77 googleAnalyticsId,
78 ...options,
79 };
80 return debouncedUpdateAccount({
81 accountId: currentCommunity.id,
82 ...params,
83 }).catch((error: any) => {
84 Toast.error(error.details || error.message || 'Something went wrong!');
85 });
86 };
87
88 const onSubmit = async (event: any) => {
89 event.preventDefault();

Callers 3

onSubmitFunction · 0.70
BrandingViewFunction · 0.70
ConfigurationsViewFunction · 0.50

Calls 1

errorMethod · 0.65

Tested by

no test coverage detected