Skip to content

Commit

Permalink
Rename UI component
Browse files Browse the repository at this point in the history
because it is not for redirecting anymore.
  • Loading branch information
tumbl3w33d committed Apr 26, 2024
1 parent 84af11b commit ae54783
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Axios from 'axios';
import React from 'react';


function RedirectComponent() {
function OAuth2ProxyApiTokenComponent() {
const [token, setToken] = React.useState('');
const [error, setError] = React.useState(false);

Expand All @@ -27,7 +27,7 @@ function RedirectComponent() {

if (typeof window !== 'undefined') {
window.ReactComponents = window.ReactComponents || {};
window.ReactComponents.RedirectComponent = RedirectComponent;
window.ReactComponents.OAuth2ProxyApiTokenComponent = OAuth2ProxyApiTokenComponent;
}

export default RedirectComponent;
export default OAuth2ProxyApiTokenComponent;
4 changes: 2 additions & 2 deletions src/frontend/src/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import ReactDOM from 'react-dom';
import RedirectComponent from './components/RedirectComponent';
import OAuth2ProxyApiTokenComponent from './components/OAuth2ProxyApiTokenComponent';

ReactDOM.render(
<RedirectComponent />
<OAuth2ProxyApiTokenComponent />
);
4 changes: 2 additions & 2 deletions src/frontend/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const TerserPlugin = require('terser-webpack-plugin');

module.exports = {
mode: 'production',
entry: './src/components/RedirectComponent.jsx',
entry: './src/components/OAuth2ProxyApiTokenComponent.jsx',
output: {
path: path.resolve(__dirname, '../../target/classes/static/rapture/'),
filename: 'bundle.js',
Expand All @@ -27,7 +27,7 @@ module.exports = {
const { merge } = require('webpack-merge');
const commonConfig = {
entry: {
'nexus-oauth2-proxy-plugin': './src/components/RedirectComponent.jsx'
'nexus-oauth2-proxy-plugin': './src/components/OAuth2ProxyApiTokenComponent.jsx'
},
output: {
filename: '[name].js',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Ext.define('NX.oauth2proxy.app.PluginConfig', {
{
mode: 'user',
path: '/oauth2proxy-apitoken',
view: window.ReactComponents.RedirectComponent,
view: window.ReactComponents.OAuth2ProxyApiTokenComponent,
text: 'OAuth2 Proxy API Token',
description: 'Access OAuth2 proxy API token',
iconCls: 'x-fa fa-key',
Expand Down

0 comments on commit ae54783

Please sign in to comment.