- {#if complete}
-
-
-
Creator journey complete
-
Click to finish.
+ {#if complete}
+
+
+
Creator journey complete
+
Click to finish.
+
-
+ {/if}
{/if}
- {/if}
-
+
+ {/if}
@@ -825,6 +866,37 @@
width: 100%;
}
+ .journey-load-error {
+ align-items: flex-start;
+ background: #fff;
+ border: 1px solid var(--journey-border);
+ border-radius: 8px;
+ display: flex;
+ flex-direction: column;
+ gap: 10px;
+ min-height: 220px;
+ justify-content: center;
+ padding: 28px;
+ }
+
+ .journey-load-error h1 {
+ color: var(--journey-black);
+ font-family: var(--font-display);
+ font-size: 24px;
+ font-weight: 500;
+ letter-spacing: 0;
+ line-height: 30px;
+ margin: 0;
+ }
+
+ .journey-load-error p {
+ color: #666;
+ font-size: 14px;
+ line-height: 22px;
+ margin: 0 0 4px;
+ max-width: 620px;
+ }
+
.step-block {
width: 100%;
}
diff --git a/frontend/src/routes/CommunityJourneyGate.svelte b/frontend/src/routes/CommunityJourneyGate.svelte
new file mode 100644
index 00000000..41550302
--- /dev/null
+++ b/frontend/src/routes/CommunityJourneyGate.svelte
@@ -0,0 +1,70 @@
+
+
+
+ Community Journey | GenLayer Portal
+
+
+{#if verificationState === 'ready'}
+
+{:else}
+
+ {#if verificationState === 'error'}
+
+ We couldn't verify your profile
+ Your journey has not been changed. Try again when the connection is available.
+
+
+ {:else}
+
+
+ {verificationState === 'redirecting' ? 'Taking you back to Community...' : 'Verifying your profile...'}
+
+ {/if}
+
+{/if}
diff --git a/frontend/src/routes/CommunityPoaps.svelte b/frontend/src/routes/CommunityPoaps.svelte
index 654a3eb3..524c8875 100644
--- a/frontend/src/routes/CommunityPoaps.svelte
+++ b/frontend/src/routes/CommunityPoaps.svelte
@@ -18,27 +18,34 @@
let page = $state(1);
let hasMore = $state(false);
let loadingMore = $state(false);
+ let loadError = $state('');
+ let loadMoreError = $state('');
let latestPoapsRequestId = 0;
const PAGE_SIZE = 48;
const poapGradientStyle = getCategoryGradientStyle('community', '#7f52e1');
- /** @param {number} [nextPage] @param {boolean} [append] */
- async function loadPoaps(nextPage = 1, append = false) {
+ /** @param {number} [nextPage] @param {boolean} [append] @param {boolean} [reuseAppliedFilters] */
+ async function loadPoaps(nextPage = 1, append = false, reuseAppliedFilters = false) {
const requestId = ++latestPoapsRequestId;
if (append) {
loadingMore = true;
+ loadMoreError = '';
} else {
loading = true;
loadingMore = false;
- appliedSearch = search.trim();
- appliedMonthFilter = monthFilter;
+ loadError = '';
+ loadMoreError = '';
+ if (!reuseAppliedFilters) {
+ appliedSearch = search.trim();
+ appliedMonthFilter = monthFilter;
+ }
hasMore = false;
}
try {
- const nextSearch = append ? appliedSearch : search.trim();
- const nextMonthFilter = append ? appliedMonthFilter : monthFilter;
+ const nextSearch = append || reuseAppliedFilters ? appliedSearch : search.trim();
+ const nextMonthFilter = append || reuseAppliedFilters ? appliedMonthFilter : monthFilter;
/** @type {Record
} */
const params = {
page: nextPage,
@@ -66,8 +73,12 @@
} catch (err) {
if (requestId !== latestPoapsRequestId) return;
const error = /** @type {any} */ (err);
- showError(error.response?.data?.error || 'Unable to load POAPs');
- if (!append) {
+ const message = error.response?.data?.error || 'Unable to load POAPs';
+ showError(message);
+ if (append) {
+ loadMoreError = message;
+ } else {
+ loadError = message;
poaps = [];
count = 0;
page = 1;
@@ -91,6 +102,9 @@
onMount(() => {
loadPoaps(1);
+ return () => {
+ latestPoapsRequestId += 1;
+ };
});
@@ -180,6 +194,18 @@
{/each}
+ {:else if loadError}
+
+
Couldn't load POAPs
+
{loadError} Try again when the connection is available.
+
+
{:else if poaps.length === 0}
No POAPs found
@@ -187,7 +213,18 @@
{:else}
- {#if hasMore}
+ {#if loadMoreError}
+
+
{loadMoreError} The POAPs already loaded are still available.
+
+
+ {:else if hasMore}