fix app install modal
This commit is contained in:
parent
3edc690075
commit
b09cec5a8d
2 changed files with 3 additions and 3 deletions
|
@ -59,7 +59,7 @@ export const AppSingle: React.FC = () => {
|
||||||
type="button"
|
type="button"
|
||||||
className="inline-flex items-center px-4 py-2 border border-gray-200 shadow-sm text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500 justify-center"
|
className="inline-flex items-center px-4 py-2 border border-gray-200 shadow-sm text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500 justify-center"
|
||||||
>
|
>
|
||||||
View Documentation
|
View manual
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -28,11 +28,11 @@ export const AppInstallModal = ({ open, onClose, appSlug }: AppInstallModalProps
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!_.isEmpty(app)) {
|
if (!_.isEmpty(app)) {
|
||||||
setAppName(app.name);
|
setAppName(app.name);
|
||||||
reset({ subdomain: getDefaultSubdomain(), configuration: initialCode });
|
reset({ subdomain: getDefaultSubdomain(), configuration: initialCode, slug: appSlug ?? '' });
|
||||||
}
|
}
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
reset({ subdomain: getDefaultSubdomain(), configuration: initialCode });
|
reset({ subdomain: getDefaultSubdomain(), configuration: initialCode, slug: appSlug ?? '' });
|
||||||
};
|
};
|
||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
}, [app, reset, open]);
|
}, [app, reset, open]);
|
||||||
|
|
Loading…
Reference in a new issue