1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-24 15:59:41 +02:00

fix note patching for Pod (#8915)

This commit is contained in:
Prabhat Khera 2023-05-10 10:42:56 +12:00 committed by GitHub
parent 7197ca435a
commit 6a29198c5c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 6 deletions

View file

@ -1,6 +1,6 @@
import { User, Clock, Edit, ChevronDown, ChevronUp } from 'lucide-react';
import moment from 'moment';
import { useState } from 'react';
import { useEffect, useState } from 'react';
import { Pod } from 'kubernetes-types/core/v1';
import { useCurrentStateAndParams } from '@uirouter/react';
@ -60,9 +60,13 @@ export function ApplicationSummaryWidget() {
application?.metadata?.annotations?.[appNoteAnnotation];
const [isNoteOpen, setIsNoteOpen] = useState(true);
const [applicationNoteFormValues, setApplicationNoteFormValues] = useState(
applicationNote || ''
);
const [applicationNoteFormValues, setApplicationNoteFormValues] =
useState('');
useEffect(() => {
setApplicationNoteFormValues(applicationNote || '');
}, [applicationNote]);
const patchApplicationMutation = usePatchApplicationMutation(
environmentId,
namespace,