Skip to content

Commit

Permalink
feat: 馃幐 Freja logo om login button
Browse files Browse the repository at this point in the history
  • Loading branch information
kajetan-kazimierczak committed Apr 13, 2022
1 parent c5bec5f commit 170b4da
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
Binary file added apps/skolplattformen-app/assets/freja_eid_low.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 17 additions & 1 deletion apps/skolplattformen-app/components/login.component.tsx
Expand Up @@ -16,6 +16,7 @@ import Personnummer from 'personnummer'
import React, { useContext, useEffect, useState } from 'react'
import {
Image,
ImageProps,
Linking,
Platform,
TouchableWithoutFeedback,
Expand Down Expand Up @@ -43,6 +44,15 @@ const BankId = () => (
accessibilityIgnoresInvertColors
/>
)
const FrejaEid = () => (
<Image
style={themedStyles.icon}
source={require('../assets/freja_eid_low.png')}
accessibilityIgnoresInvertColors
/>
)



interface Logins {
BANKID_SAME_DEVICE: number
Expand Down Expand Up @@ -102,6 +112,12 @@ export const Login = () => {
}
}, [api])

const LoginProviderImage = () => {
//if(loginMethodId == 'testuser') return undefined
if(loginMethodId == 'freja') return FrejaEid()
return BankId()
}

const getSchoolPlatformName = () => {
return schoolPlatforms.find((item) => item.id === currentSchoolPlatform)
?.displayName
Expand Down Expand Up @@ -231,7 +247,7 @@ export const Login = () => {
appearance="ghost"
disabled={isUsingPersonalIdNumber && !valid}
status="primary"
accessoryLeft={BankId}
accessoryLeft={LoginProviderImage}
size="medium"
>
{currentLoginMethod.title}
Expand Down

0 comments on commit 170b4da

Please sign in to comment.