-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fb83951
commit 1b5fabc
Showing
4 changed files
with
54 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,12 @@ | ||
import fakeCredentials from '$lib/fakeCredentials.js'; | ||
import { getService } from '$lib/slangroom/services.js'; | ||
|
||
export const load = async ({ params }) => { | ||
const credential = await getService(params.id); | ||
const id = params['id']; | ||
if (id.length < 3) { | ||
const credential = fakeCredentials.find((c) => c.id === id); | ||
return { credential }; | ||
} | ||
const credential = await getService(id); | ||
return { credential }; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<script lang="ts"> | ||
export let data: any; | ||
const { credential } = data; | ||
</script> | ||
|
||
<ion-header> | ||
<ion-toolbar> | ||
<ion-title>CREDENTIAL DETAIL</ion-title> | ||
</ion-toolbar> | ||
</ion-header> | ||
<ion-content fullscreen class="ion-padding"> | ||
<d-credential-card {...credential} /> | ||
<div class="bg-tab fixed bottom-0 left-0 w-full"> | ||
<d-credential-detail {...credential}> | ||
<div class="mb-2"> | ||
{#if credential.id.length < 3} | ||
<d-button color="accent" href="/scan">Verify credential</d-button> | ||
{:else} | ||
<d-button color="accent" href={`/${credential.id}/credential-offer`} | ||
>Get this credential</d-button | ||
> | ||
{/if} | ||
</div> | ||
</d-credential-detail> | ||
</div> | ||
</ion-content> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters