Created short URLs component

This commit is contained in:
Alejandro Celaya 2018-07-20 22:32:50 +02:00
parent 3b104b0ead
commit b2fa86a917
6 changed files with 16 additions and 5 deletions

View file

@ -32,7 +32,7 @@ export default function AsideMenu({ selectedServer, history }) {
to={`/server/${serverId}/create-short-url`} to={`/server/${serverId}/create-short-url`}
> >
<FontAwesomeIcon icon={createIcon} /> <FontAwesomeIcon icon={createIcon} />
<span className="aside-menu__item-text">Create short code</span> <span className="aside-menu__item-text">Create short URL</span>
</NavLink> </NavLink>
<DeleteServerButton <DeleteServerButton

View file

@ -1,6 +1,7 @@
import React from 'react'; import React from 'react';
import { Route, Switch } from 'react-router-dom'; import { Route, Switch } from 'react-router-dom';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import CreateShortUrl from '../short-urls/CreateShortUrl';
import ShortUrls from '../short-urls/ShortUrls'; import ShortUrls from '../short-urls/ShortUrls';
import AsideMenu from './AsideMenu'; import AsideMenu from './AsideMenu';
@ -15,6 +16,11 @@ export function MenuLayout(props) {
path="/server/:serverId/list-short-urls/:page" path="/server/:serverId/list-short-urls/:page"
component={ShortUrls} component={ShortUrls}
/> />
<Route
exact
path="/server/:serverId/create-short-url"
component={CreateShortUrl}
/>
</Switch> </Switch>
</div> </div>
</div> </div>

View file

@ -11,3 +11,7 @@
.dropdown-item.active { .dropdown-item.active {
background-color: $mainColor !important; background-color: $mainColor !important;
} }
.short-urls-container {
padding: 30px 30px 30px 20px;
}

View file

@ -0,0 +1,5 @@
import React from 'react';
export default function CreateShortUrl() {
return <div className="short-urls-container">Create short URL</div>
}

View file

@ -2,7 +2,6 @@ import React from 'react';
import { connect } from 'react-redux'; import { connect } from 'react-redux';
import Paginator from './Paginator'; import Paginator from './Paginator';
import SearchBar from './SearchBar'; import SearchBar from './SearchBar';
import './ShortUrls.scss';
import ShortUrlsList from './ShortUrlsList'; import ShortUrlsList from './ShortUrlsList';
export function ShortUrls(props) { export function ShortUrls(props) {

View file

@ -1,3 +0,0 @@
.short-urls-container {
padding: 30px 30px 30px 20px;
}