Skip to content

Commit

Permalink
Change the user-data variables
Browse files Browse the repository at this point in the history
  • Loading branch information
Arpita-Jaiswal committed Nov 30, 2023
1 parent 5bba07b commit 38051de
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 30 deletions.
9 changes: 3 additions & 6 deletions slides/components/full-page.ftd
Original file line number Diff line number Diff line change
Expand Up @@ -52,19 +52,16 @@ height.fixed.px: 32
-- ftd.row:
spacing.fixed.px: 32
align-content: center
if: { header.user-data.ud.is-logged-in }
if: { header.user-data.is-logged-in }

-- button: Share
button-link: /
button-icon: $assets.files.slides.assets.share.svg

-- notification:

/-- ftd.text: $header.user-data.ud.ww.name
if: { header.user-data.ud.ww != NULL }

-- avatar: $header.user-data.ud.name
email: $header.user-data.ud.email
-- avatar: $header.user-data.name
email: $header.user-data.email

-- end: ftd.row

Expand Down
3 changes: 1 addition & 2 deletions slides/functions.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
function get_initials(name) {
return name
.get("value")
return fastn_utils.getStaticValue(name)
.split(" ")
.map((p) => p[0])
.join("");
Expand Down
15 changes: 4 additions & 11 deletions slides/scenarios/john-doe-ud.ftd
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
-- record user-details:
boolean is-logged-in:
string name:
string email:
string username:

-- user-details ud:
is-logged-in: true
name: John Doe
email: john-doe@abc.com
username: john-doe
-- boolean is-logged-in: true
-- string name: John Doe
-- string email: john-doe@abc.com
-- string username: john-doe
15 changes: 4 additions & 11 deletions slides/user-data.ftd
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
-- record user-details:
boolean is-logged-in:
string name:
string email:
string username:

-- user-details ud:
is-logged-in: false
name: $ftd.empty
email: $ftd.empty
username: $ftd.empty
-- boolean is-logged-in: false
-- string name: $ftd.empty
-- string email: $ftd.empty
-- string username: $ftd.empty

0 comments on commit 38051de

Please sign in to comment.