fixed wrong redirection

merge-requests/77/head
Jayasanka 6 years ago
parent 9c80756c12
commit ca1f147c77

@ -20,7 +20,7 @@ class App extends React.Component {
<Router>
<div>
<Switch>
<Redirect exact from="/publisher" to="/publisher/dashboard/apps"/>
<Redirect exact from="/publisher" to="/publisher/apps"/>
{this.routes.map((route) => (
<RouteWithSubRoutes key={route.path} {...route} />
))}

@ -4,7 +4,7 @@ import * as serviceWorker from './serviceWorker';
import App from "./App";
import Login from "./pages/Login";
import Dashboard from "./pages/dashboard/Dashboard";
import OldApps from "./pages/dashboard/apps/OldApps";
import Apps from "./pages/dashboard/apps/Apps";
import AddNewApp from "./pages/dashboard/add-new-app/AddNewApp";
import './index.css';
import store from "./js/store/index";
@ -25,7 +25,7 @@ const routes = [
routes: [
{
path: '/publisher/apps',
component: OldApps,
component: Apps,
exact: true
},
{

@ -0,0 +1,64 @@
import React from "react";
import "antd/dist/antd.css";
import {Table, Divider, Tag, Card, PageHeader, Typography, Avatar,Input, Button, Icon, Row, Col} from "antd";
import Highlighter from 'react-highlight-words';
import axios from "axios";
const Paragraph = Typography;
const Search = Input.Search;
const routes = [
{
path: 'index',
breadcrumbName: 'Publisher',
},
{
path: 'first',
breadcrumbName: 'Dashboard',
},
{
path: 'second',
breadcrumbName: 'Apps',
},
];
class Apps extends React.Component {
routes;
constructor(props) {
super(props);
this.routes = props.routes;
}
render() {
return (
<div>
<PageHeader
breadcrumb={{routes}}
/>
<div style={{background: '#f0f2f5', padding: 24, minHeight: 780}}>
<Card>
<Row style={{padding:10}}>
<Col span={6} offset={18}>
<Search
placeholder="search"
onSearch={value => console.log(value)}
style={{ width: 200}}
/>
<Button style={{margin:5}}>Advanced Search</Button>
</Col>
</Row>
</Card>
</div>
</div>
);
}
}
export default Apps;
Loading…
Cancel
Save