diff --git a/src/app/dashboard/dashboard.component.html b/src/app/dashboard/dashboard.component.html index e47f465..d797e70 100644 --- a/src/app/dashboard/dashboard.component.html +++ b/src/app/dashboard/dashboard.component.html @@ -14,7 +14,9 @@ ID - {{element.id}} + + {{element.id}} + diff --git a/src/app/dashboard/dashboard.component.ts b/src/app/dashboard/dashboard.component.ts index 20fce72..428b89f 100644 --- a/src/app/dashboard/dashboard.component.ts +++ b/src/app/dashboard/dashboard.component.ts @@ -21,7 +21,11 @@ export class DashboardComponent { constructor(private linkService: LinkService, private router: Router) { }; copyLink(id: string) { - navigator.clipboard.writeText(window.location.hostname + '/' + id); + navigator.clipboard.writeText(this.getShortLink(id)); + } + + getShortLink(id: string): string { + return window.location.hostname + '/' + id; } ngOnInit(): void {