Skip to content

Commit

Permalink
refactor: streamline login redirection and improve styles
Browse files Browse the repository at this point in the history
Remove unnecessary console logs during login redirection and 
directly set the window location for a cleaner flow. Enhance 
the button wrapper styles for better responsiveness and 
alignment in the BffDoubleSession component.
  • Loading branch information
snaerth committed Dec 16, 2024
1 parent c3fd8ad commit 6b4ff4c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
9 changes: 9 additions & 0 deletions libs/react-spa/bff/src/lib/BffDoubleSession.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,13 @@ import { style } from '@vanilla-extract/css'

export const buttonWrapper = style({
marginTop: theme.spacing[2],
display: 'inline-flex',
flexDirection: 'column',
alignItems: 'center',

'@media': {
[`screen and (min-width: ${theme.breakpoints.md}px)`]: {
display: 'inline',
},
},
})
1 change: 0 additions & 1 deletion libs/react-spa/bff/src/lib/BffDoubleSession.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ export const BffDoubleSessionModal = ({
<Button variant="text" onClick={() => onKeepCurrentUser()}>
halda fyrri innskráningu
</Button>
.
</span>
</>
}
Expand Down
10 changes: 1 addition & 9 deletions libs/react-spa/bff/src/lib/BffProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -207,15 +207,7 @@ export const BffProvider = ({

const loginQueryParams = getLoginQueryParams()
const targetLinkUri = loginQueryParams['target_link_uri']
console.log(
nationalId,
bffUrlGenerator('/login', {
target_link_uri: targetLinkUri,
...(nationalId
? { login_hint: nationalId }
: { prompt: 'select_account' }),
}),
)

window.location.href = bffUrlGenerator('/login', {
target_link_uri: targetLinkUri,
...(nationalId
Expand Down

0 comments on commit 6b4ff4c

Please sign in to comment.