MCPcopy
hub / github.com/futantan/OpenGpt / handleSave

Function handleSave

src/components/LicenseForm.tsx:29–43  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

27 }
28
29 const handleSave = async () => {
30 const value = licenseKeyInputRef.current?.value || ''
31 if (value === '') {
32 return
33 }
34
35 toast(t('saving'))
36 const { isValid } = await clientValidateLicenseKey(value)
37 if (isValid) {
38 saveLicenseKey(value)
39 toast(t('saved'), { icon: '✅' })
40 } else {
41 toast(t('license_wrong'), { icon: '❌' })
42 }
43 }
44
45 return (
46 <>

Callers

nothing calls this directly

Calls 2

clientValidateLicenseKeyFunction · 0.90
saveLicenseKeyFunction · 0.90

Tested by

no test coverage detected