From eea5b0341f38291f6759327117cfe824aa39a599 Mon Sep 17 00:00:00 2001 From: Richard Tan Date: Fri, 13 Dec 2024 16:23:32 +0800 Subject: [PATCH] Remove https when displaying website fields --- packages/experiments-realm/website.gts | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/packages/experiments-realm/website.gts b/packages/experiments-realm/website.gts index 4a2dd24bcb..f16030d35d 100644 --- a/packages/experiments-realm/website.gts +++ b/packages/experiments-realm/website.gts @@ -3,17 +3,32 @@ import { UrlField } from './url'; import { Component } from 'https://cardstack.com/base/card-api'; import { EntityDisplay } from './components/entity-display'; +const domainWithPath = (urlString: string | null) => { + if (!urlString) { + return ''; + } + + const url = new URL(urlString); + return `${url.hostname}${url.pathname === '/' ? '' : url.pathname}`; +}; + export class WebsiteField extends UrlField { static icon = WorldWwwIcon; static displayName = 'Website'; - static atom = class Atom extends Component { + static atom = class Atom extends Component { }; + + static embedded = class Embedded extends Component { + + }; }