Created
December 9, 2020 21:19
-
-
Save jeremyvial/1abdc62b8208e22d6b4d5ca95d00a2a8 to your computer and use it in GitHub Desktop.
LWC Challenge Component1
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
<template> | |
<lightning-card | |
title="Welcome" | |
icon-name="standard:contact" | |
> | |
<h1>Hi thank you for participating in our challenge </h1> | |
<template if:true={isUserConnected}> | |
<h1> Congrats !! your key is : bdxcfvjgyjM2020 </h1> | |
</template> | |
</lightning-card> | |
</template> |
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
import { LightningElement, api, track } from 'lwc'; | |
import Id from '@salesforce/user/Id'; | |
export default class Component1 extends LightningElement { | |
@api recordId; | |
@track areDetailsVisible = false; | |
get isUserConnected(){ | |
if(Id != undefined && Id != null){return true} | |
else{ return false;} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment