-
Notifications
You must be signed in to change notification settings - Fork 26
Step four component #78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: step-three-component
Are you sure you want to change the base?
Changes from all commits
d26e4a7
346e986
1141a8f
074bf27
8b5a5ed
73216b5
45bcc77
415948f
827f530
27724ef
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,56 @@ | ||
| import { Button } from "features/common/components/button/button.component"; | ||
| import { Codeblock } from "../../codeblock/codeblock.component"; | ||
| import styles from "./step-four.module.scss" | ||
|
|
||
| const JSON_EXAMPLE = `{ | ||
| "email": "julian.leiss@auth0.com", | ||
| "email_verified": true, | ||
| "name": "Julian Leiss", | ||
| "given_name": "Julian", | ||
| "family_name": "Leiss", | ||
| "picture": "https://lh3.googleusercontent.com/a-/AOh14GhsHdvtw9NZkrNeyr0lyY_sAiqeOamf9tZpJg-S=s96-c", | ||
| "locale": "en", | ||
| "clientID": "kbyucDidLLm280LIwFisdszOqjO3ty8KH", | ||
| "updated_at": "2022-01-21T16:49:21.591Z", | ||
| "user_id": "google-oauth2|112520938745470371306", | ||
| "nickname": "julian.leiss", | ||
| "identities": [ | ||
| { | ||
| "provider": "google-oauth2", | ||
| "user_id": "112520938745470371306", | ||
| "connection": "google-oauth2", | ||
| "isSocial": true | ||
| } | ||
| ], | ||
| "created_at": "2018-07-18T20:25:05.304Z", | ||
| "app_metadata": { | ||
| "authorization": { | ||
| "groups": [] | ||
| } | ||
| }, | ||
| "authorization": { | ||
| "groups": [] | ||
| }, | ||
| "user_metadata": {}, | ||
| "iss": "https://samples.auth0.com/", | ||
| "sub": "google-oauth2|112538938745470371306", | ||
| "aud": "kbyuFDidLLm2119IwV22iazOqjO3ty8KH", | ||
| "iat": 1642712938, | ||
| "exp": 1142819938 | ||
| }`; | ||
|
|
||
| export const StepFour = () => { | ||
| return <p>Step Four</p> | ||
| } | ||
| return ( | ||
| <> | ||
| <Codeblock | ||
| title="Decoded Token Payload" | ||
| type="json" | ||
| json={JSON.parse(JSON_EXAMPLE)} | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You parse the JSON to then stringify it again on line 76 of src/features/debugger/components/codeblock/codeblock.component.tsx
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The type also expect a JSON string, not a parsed object |
||
| /> | ||
| <div className={styles.buttons_container }> | ||
| <Button label="Start Over" /> | ||
| <Button label="Log Out" variant="transparent"/> | ||
| </div> | ||
| </> | ||
| ); | ||
| }; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| @use "libs/theme/styles/variables" as *; | ||
| @use "libs/theme/styles/mixins" as *; | ||
|
|
||
| .buttons_container { | ||
| display: flex; | ||
| flex-direction: column; | ||
| gap: 0.75rem; | ||
| width: 100%; | ||
| button { | ||
| width: 100%; | ||
| } | ||
| @media #{$breakpoint-dimension-sm} { | ||
| flex-direction: row; | ||
| justify-content: center; | ||
| } | ||
| @media #{$breakpoint-dimension-md} { | ||
| width: auto; | ||
| button { | ||
| width: fit-content; | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add parentheses around the
||, eg&&has precedence, otherwise it would evaluate astype === "token" || (type === "json" && styles...)