mirror of
https://github.com/urbit/shrub.git
synced 2024-12-25 21:12:56 +03:00
interface: fix default app tiles linking as anchor
This commit is contained in:
parent
bb2c847e0d
commit
9d5645f8d7
@ -10,7 +10,7 @@ import { Box } from "@tlon/indigo-react";
|
||||
export default class Tile extends React.Component {
|
||||
render() {
|
||||
const { bg, to, p, ...props } = this.props;
|
||||
|
||||
|
||||
let childElement = (
|
||||
<Box p={typeof p === 'undefined' ? 2 : p} bg={bg} width="100%" height="100%">
|
||||
{props.children}
|
||||
@ -18,12 +18,12 @@ export default class Tile extends React.Component {
|
||||
);
|
||||
|
||||
if (to) {
|
||||
if (routeList.indexOf(to) === -1) {
|
||||
if (routeList.indexOf(to) !== -1 || to === '/~landscape/home' || to === '/~profile') {
|
||||
childElement= (<Link to={to}>{childElement}</Link>);
|
||||
} else {
|
||||
childElement= (<a href={to}>{childElement}</a>);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
return (
|
||||
|
Loading…
Reference in New Issue
Block a user