Skip to content

Commit 175b970

Browse files
committed
fix: user card
1 parent d1d25d8 commit 175b970

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

packages/agent-api/src/functions/me-get.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ app.http("me-get", {
3030
user = await db.createUser(id);
3131
context.log(`Created new user with ID: ${id}`);
3232
} else {
33-
context.log({user});
3433
context.log(`User exists, returning ID: ${user.id}`);
3534
}
3635

packages/agent-webapp/src/components/user-card.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,8 @@ export class UserCard extends LitElement {
123123
if (!response.ok) {
124124
throw new Error("An error occurred while fetching the user ID");
125125
}
126-
const data = await response.json();
127-
this.userId = data.userId;
126+
const { id } = await response.json();
127+
this.userId = id;
128128
} catch (error) {
129129
console.error("Error fetching user ID:", error);
130130
this.hasError = true;
@@ -146,7 +146,7 @@ export class UserCard extends LitElement {
146146
<button class="close-button" @click="${this.closeModal}" aria-label="Close modal">×</button>
147147
${this.isLoading
148148
? this.renderLoading()
149-
: !this.username
149+
: !this.username || this.hasError
150150
? this.renderError()
151151
: this.renderRegistrationCard()}
152152
</div>
@@ -208,7 +208,7 @@ export class UserCard extends LitElement {
208208
209209
.modal-content {
210210
position: relative;
211-
max-width: 600px;
211+
max-width: 640px;
212212
width: 100%;
213213
max-height: 90vh;
214214
background: var(--azc-primary);
@@ -283,7 +283,7 @@ export class UserCard extends LitElement {
283283
font-weight: 600;
284284
margin: 0;
285285
white-space: normal;
286-
word-wrap: break-word;
286+
line-break: anywhere;
287287
}
288288
p {
289289
margin: 1.5rem 0 0 0;

0 commit comments

Comments
 (0)