feat: 🎸 Freja logo om login button

This commit is contained in:
Kajetan Kazimierczak 2022-04-13 18:21:18 +02:00
parent c5bec5f9ee
commit 170b4da39a
2 changed files with 17 additions and 1 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 365 B

View File

@ -16,6 +16,7 @@ import Personnummer from 'personnummer'
import React, { useContext, useEffect, useState } from 'react'
import {
Image,
ImageProps,
Linking,
Platform,
TouchableWithoutFeedback,
@ -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
@ -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
@ -231,7 +247,7 @@ export const Login = () => {
appearance="ghost"
disabled={isUsingPersonalIdNumber && !valid}
status="primary"
accessoryLeft={BankId}
accessoryLeft={LoginProviderImage}
size="medium"
>
{currentLoginMethod.title}