fix removing items
This commit is contained in:
@@ -1,9 +1,18 @@
|
||||
import * as React from "bloatless-react";
|
||||
|
||||
import ConnectionViewModel from "../../ViewModel/connectionViewModel";
|
||||
import { DeletableListItem } from "../Components/deletableListItem";
|
||||
import { translations } from "../translations";
|
||||
|
||||
export function ConnectionModal(connectionViewModel: ConnectionViewModel) {
|
||||
const previousAddressConverter: React.StateItemConverter<string> = (
|
||||
address: string
|
||||
) => {
|
||||
return DeletableListItem(address, () => {
|
||||
connectionViewModel.removePreviousAddress(address);
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<div
|
||||
class="modal"
|
||||
@@ -13,10 +22,16 @@ export function ConnectionModal(connectionViewModel: ConnectionViewModel) {
|
||||
<main>
|
||||
<h2>{translations.connectionModal.connectionModalHeadline}</h2>
|
||||
|
||||
|
||||
<div
|
||||
class="flex-column gap"
|
||||
children:append={[
|
||||
connectionViewModel.previousAddresses,
|
||||
previousAddressConverter,
|
||||
]}
|
||||
></div>
|
||||
</main>
|
||||
<button on:click={connectionViewModel.hideConnectionModal}>
|
||||
{translations.general.closeButton}
|
||||
{translations.general.closeButtonAudioLabel}
|
||||
<span class="icon">close</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user