[Templating] Fix react template typos (dotnet/aspnetcore#8592)
Commit migrated from dotnet/aspnetcore@5c6e1aa1d9
This commit is contained in:
Родитель
6884a7d97c
Коммит
2599383ae4
|
@ -23,7 +23,7 @@ export default class App extends Component {
|
|||
////#endif
|
||||
////#if (IndividualLocalAuth)
|
||||
<AuthorizeRoute path='/fetch-data' component={FetchData} />
|
||||
<Route path={ApplicationPaths.ApiAuthorizationPrefix} Component={ApiAuthorizationRoutes} />
|
||||
<Route path={ApplicationPaths.ApiAuthorizationPrefix} component={ApiAuthorizationRoutes} />
|
||||
////#endif
|
||||
</Layout>
|
||||
);
|
||||
|
|
|
@ -56,7 +56,7 @@ export class FetchData extends Component {
|
|||
|
||||
async populateWeatherData() {
|
||||
////#if (IndividualLocalAuth)
|
||||
const token = authService.getAccessToken();
|
||||
const token = await authService.getAccessToken();
|
||||
const response = await fetch('api/SampleData/WeatherForecasts', {
|
||||
headers: !token ? {} : { 'Authorization': `Bearer ${token}` }
|
||||
});
|
||||
|
|
|
@ -24,7 +24,7 @@ const prefix = '/authentication';
|
|||
export const ApplicationPaths = {
|
||||
DefaultLoginRedirectPath: '/',
|
||||
ApiAuthorizationClientConfigurationUrl: `/_configuration/${ApplicationName}`,
|
||||
ApiAuthorizationPrefix = prefix,
|
||||
ApiAuthorizationPrefix: prefix,
|
||||
Login: `${prefix}/${LoginActions.Login}`,
|
||||
LoginFailed: `${prefix}/${LoginActions.LoginFailed}`,
|
||||
LoginCallback: `${prefix}/${LoginActions.LoginCallback}`,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import React, { Component, Fragment } from 'react';
|
||||
import { Route } from 'react-router';
|
||||
import { Login } from './components/api-authorization/Login'
|
||||
import { Logout } from './components/api-authorization/Logout'
|
||||
import { Login } from './Login'
|
||||
import { Logout } from './Logout'
|
||||
import { ApplicationPaths, LoginActions, LogoutActions } from './ApiAuthorizationConstants';
|
||||
|
||||
export default class ApiAuthorizationRoutes extends Component {
|
||||
|
|
Загрузка…
Ссылка в новой задаче