Skip to content

Commit f3d3a20

Browse files
committed
fix: api route
1 parent af26bb2 commit f3d3a20

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

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

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ import copySvg from "../../assets/icons/copy.svg?raw";
66
import burgerOutlineSvg from "../../assets/icons/burger-outline.svg?raw";
77
import cardSvg from "../../assets/icons/card.svg?raw";
88

9-
export const apiBaseUrl: string =
10-
import.meta.env.VITE_REGISTRATION_API_URL || "";
11-
129
@customElement("azc-user-card")
1310
export class UserCard extends LitElement {
1411
@state() protected userId: string = "";
@@ -122,7 +119,7 @@ export class UserCard extends LitElement {
122119
if (!authDetails) return;
123120
this.username = authDetails.userDetails;
124121

125-
const response = await fetch(`${apiBaseUrl}/me`);
122+
const response = await fetch(`/api/me`);
126123
if (!response.ok) {
127124
throw new Error("An error occurred while fetching the user ID");
128125
}
@@ -165,8 +162,8 @@ export class UserCard extends LitElement {
165162

166163
static override styles = css`
167164
:host {
168-
--reg-primary: linear-gradient(135deg, #de471d 0%, #ff6b3d 100%);
169-
--reg-border-radius: 16px;
165+
--azc-primary: linear-gradient(135deg, #de471d 0%, #ff6b3d 100%);
166+
--azc-border-radius: 16px;
170167
}
171168
172169
.member-card-link {
@@ -214,8 +211,8 @@ export class UserCard extends LitElement {
214211
max-width: 600px;
215212
width: 100%;
216213
max-height: 90vh;
217-
background: var(--reg-primary);
218-
border-radius: var(--reg-border-radius, 16px);
214+
background: var(--azc-primary);
215+
border-radius: var(--azc-border-radius, 16px);
219216
}
220217
221218
.close-button {
@@ -261,8 +258,8 @@ export class UserCard extends LitElement {
261258
}
262259
.card {
263260
position: relative;
264-
background: var(--reg-primary);
265-
border-radius: var(--reg-border-radius);
261+
background: var(--azc-primary);
262+
border-radius: var(--azc-border-radius);
266263
padding: 2rem;
267264
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2),
268265
-1px -1px 1px rgba(255, 255, 255, 0.3),
@@ -323,6 +320,7 @@ export class UserCard extends LitElement {
323320
right: -1rem;
324321
top: 3.5rem;
325322
pointer-events: none;
323+
clip-path: inset(0 1rem 0 0);
326324
}
327325
.user-id-row {
328326
display: flex;
@@ -331,7 +329,7 @@ export class UserCard extends LitElement {
331329
gap: 0.5rem;
332330
border: 1px solid #ffffff;
333331
padding: 1rem;
334-
border-radius: calc(var(--reg-border-radius) / 2);
332+
border-radius: calc(var(--azc-border-radius) / 2);
335333
margin: 0.5rem 0;
336334
}
337335
.copy-button {

0 commit comments

Comments
 (0)