我在我的应用程序中使用 azure b2c 注册策略(内置策略)。在那里,我们有三个字段。
就我而言,我想从用户流中删除此显示名称。但是一旦我删除它,在 B2C 中,用户的名称就是“未定义”。
有什么方法可以在不询问显示名称的情况下生成带有名字和姓氏的显示名称?
(我正在使用内置用户流程)
我使用react-native-element在我的应用程序中显示车辆列表。这是我的代码。
import React, { Component } from 'react'
import { Text, View, FlatList, StyleSheet, TextInput, KeyboardAvoidingView } from 'react-native'
import { Card, ListItem, Button, Icon } from 'react-native-elements'
import { fb, database } from '../../../config/config';
class Vehicles extends Component {
constructor(props) {
super(props);
this.state = {
v_number: "",
v_brand: "",
v_type: "",
user: null,
v_list: []
};
}
componentDidMount() {
this.getDataFromFBase();
}
getDataFromFBase() {
fb.auth().onAuthStateChanged(function (user) {
if (user) {
this.setState({
user
});
database.collection('Users').doc(user.uid)
.collection('Vehicles').onSnapshot(snap => {
snap.docChanges().forEach(change => { …Run Code Online (Sandbox Code Playgroud) 在我的项目中,我有一个 antd 表。在那个表中,我列出了运动员。当我点击运动员的名字时,我应该被导航到运动员资料页面。
运动员资料路线 /athletes/{id}
但是对于这张桌子,我无法获得任何价值id。
这是我的数据源
[
{
email: "x@x.com",
firstName: "X",
id: 402,
lastName: "X"
},
{
email: "y@y.com",
firstName: "Y",
id: 403,
lastName: "Y"
},
{
email: "z@z.com",
firstName: "Z",
id: 404,
lastName: "Z"
}
]
Run Code Online (Sandbox Code Playgroud)
以下是列对象的代码
const columns = [
{
title: "First Name",
dataIndex: "firstName",
className: "col-first-name",
render: (text) => (
<Link to={"/athletes/" + ???}>{text}</Link>
),
},
{
title: "Last Name",
dataIndex: "lastName",
className: "col-last-name"
},
{
title: "Email",
dataIndex: "email",
className: "col-email", …Run Code Online (Sandbox Code Playgroud)