From 98f7a391856d85ebf339b0ed156097b33b565753 Mon Sep 17 00:00:00 2001 From: Jake/Rads Date: Mon, 27 Jun 2022 17:00:48 +0200 Subject: [PATCH] fix(dashboard): fix public profile page links --- dashboard/src/lib/list/CardsList.svelte | 3 +-- dashboard/src/lib/list/List.svelte | 3 +-- dashboard/src/pages/Group.svelte | 2 +- dashboard/src/pages/Member.svelte | 2 +- dashboard/src/pages/Random.svelte | 2 +- 5 files changed, 5 insertions(+), 7 deletions(-) diff --git a/dashboard/src/lib/list/CardsList.svelte b/dashboard/src/lib/list/CardsList.svelte index 5e13eaa2..b0d3dab2 100644 --- a/dashboard/src/lib/list/CardsList.svelte +++ b/dashboard/src/lib/list/CardsList.svelte @@ -19,7 +19,6 @@ export let isPublic: boolean; export let itemType: string; - export let isMainDash: boolean; export let itemsPerPage: number; export let currentPage: number; export let fullLength: number; @@ -31,7 +30,7 @@ function getItemLink(item: Member | Group): string { let url: string; - if (isMainDash) url = "/dash/"; + if (!isPublic) url = "/dash/"; else url = "/profile/"; if (itemType === "member") url += "m/"; diff --git a/dashboard/src/lib/list/List.svelte b/dashboard/src/lib/list/List.svelte index 6044f98c..b4af4be0 100644 --- a/dashboard/src/lib/list/List.svelte +++ b/dashboard/src/lib/list/List.svelte @@ -41,7 +41,6 @@ $: slicedList = processedList.slice(indexOfFirstItem, indexOfLastItem); export let isPublic: boolean; - export let isMainDash = true; export let itemType: string; let searchValue: string = ""; @@ -132,6 +131,6 @@ {/if} {/if} - + {/if} diff --git a/dashboard/src/pages/Group.svelte b/dashboard/src/pages/Group.svelte index 0a40546e..38cba0f8 100644 --- a/dashboard/src/pages/Group.svelte +++ b/dashboard/src/pages/Group.svelte @@ -156,7 +156,7 @@ - deleteMemberFromList(e)} bind:list={slicedMembers} isPublic={isPublic} isMainDash={false} itemType="member" itemsPerPage={itemsPerPage} currentPage={currentPage} fullLength={members.length} /> + deleteMemberFromList(e)} bind:list={slicedMembers} isPublic={isPublic} itemType="member" itemsPerPage={itemsPerPage} currentPage={currentPage} fullLength={members.length} /> {/if} {/if} diff --git a/dashboard/src/pages/Member.svelte b/dashboard/src/pages/Member.svelte index cc279372..eb34ecef 100644 --- a/dashboard/src/pages/Member.svelte +++ b/dashboard/src/pages/Member.svelte @@ -158,7 +158,7 @@ - deleteGroupFromList(e)} bind:list={slicedGroups} isPublic={isPublic} isMainDash={false} itemType="group" itemsPerPage={itemsPerPage} currentPage={currentPage} fullLength={groups.length} /> + deleteGroupFromList(e)} bind:list={slicedGroups} isPublic={isPublic} itemType="group" itemsPerPage={itemsPerPage} currentPage={currentPage} fullLength={groups.length} /> {/if} {/if} diff --git a/dashboard/src/pages/Random.svelte b/dashboard/src/pages/Random.svelte index fc29a5c7..963212f4 100644 --- a/dashboard/src/pages/Random.svelte +++ b/dashboard/src/pages/Random.svelte @@ -206,7 +206,7 @@ {:else if err} {err} {:else} - + {/if}