mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-09-22 07:59:22 +03:00
interface: create 'default apps' library
We don't want to maintain several indexes of the Landscape suite when we want to special case something. Now we don't.
This commit is contained in:
parent
3ab634a788
commit
657ffa8792
@ -1,6 +1,7 @@
|
||||
import React from 'react';
|
||||
import classnames from 'classnames';
|
||||
import { Link } from 'react-router-dom';
|
||||
import defaultApps from '../../../../lib/default-apps';
|
||||
|
||||
import Tile from './tile';
|
||||
|
||||
@ -29,7 +30,9 @@ export default class BasicTile extends React.PureComponent {
|
||||
</span>
|
||||
);
|
||||
|
||||
const routeList = ['/~chat', '/~publish', '/~link', '/~groups', '/~dojo'];
|
||||
const routeList = defaultApps.map((e) => {
|
||||
return `/~${e}`;
|
||||
});
|
||||
|
||||
const tile = ( routeList.indexOf(props.linkedUrl) !== -1 ) ? (
|
||||
<Link className="w-100 h-100 db pa2 no-underline" to={props.linkedUrl}>
|
||||
|
3
pkg/interface/src/lib/default-apps.js
Normal file
3
pkg/interface/src/lib/default-apps.js
Normal file
@ -0,0 +1,3 @@
|
||||
const defaultApps = ['chat', 'dojo', 'groups', 'link', 'publish'];
|
||||
|
||||
export default defaultApps;
|
Loading…
Reference in New Issue
Block a user