From 9f396a167a0316c190acf0f1e2f56d29d8f8ec88 Mon Sep 17 00:00:00 2001 From: Eric van der Vlist Date: Mon, 27 Feb 2023 19:28:18 +0100 Subject: [PATCH] Starting to implement subscriptions. --- src/components/user/User.tsx | 199 +++++++++++++++++------------------ 1 file changed, 97 insertions(+), 102 deletions(-) diff --git a/src/components/user/User.tsx b/src/components/user/User.tsx index 1f62bad..89e90a6 100644 --- a/src/components/user/User.tsx +++ b/src/components/user/User.tsx @@ -1,5 +1,5 @@ import { createForm } from '@felte/solid'; -import { Component, Index, Match, onMount, Switch } from 'solid-js'; +import { Component, Index, Match, onMount, Show, Switch } from 'solid-js'; import { TextField, Button } from '@kobalte/core'; import reporter from '@felte/reporter-tippy'; import './style.css'; @@ -130,7 +130,8 @@ const User: Component = (props) => { } function addSubscription(index?: number) { - return () => addField(`subscriptions`, { user: '', direction: '' }, index); + return () => + addField(`subscriptions`, { username: '', direction: '' }, index); } console.log({ @@ -141,106 +142,100 @@ const User: Component = (props) => { }); return ( -
- - Mail address - - - Please provide a valid URL - - - - Database - - - - User name - - - - Password - - - - - - - - - - - - - {(_, index) => ( - - - - - - )} - - -
- - UserDirection
- - - - - - - - - -
- - - Save - Delete - - - Create - - - Cancel -
+ <> + +

{userId(data('username'), data('database'))}

+
+
+ + Mail address + + + Please provide a valid URL + + + + Database + + + + User name + + + + Password + + + + + + + + + + + + {(_, index) => ( + + + + + )} + + +
+ + User name
+ + + + + +
+ + + Save + Delete + + + Create + + + Cancel +
+ ); };