The Functions page was not updating after a function was deleted. This was because the local `functions` variable was not being updated after a successful deletion.
This commit fixes the bug by filtering the deleted function from the local `functions` array, which triggers a UI refresh.