mirror of
https://github.com/urbit/shrub.git
synced 2024-11-25 07:12:10 +03:00
Launch: cleanup design
This commit is contained in:
parent
2ed5e4e077
commit
5f3e96566d
@ -58,7 +58,9 @@ export default function Groups(props: GroupsProps & Parameters<typeof Box>[0]) {
|
||||
gridAutoRows="124px"
|
||||
gridTemplateColumns="repeat(auto-fit, 124px)"
|
||||
gridGap={3}
|
||||
p={2}
|
||||
px={2}
|
||||
pt={2}
|
||||
pb="7"
|
||||
>
|
||||
{incomingGroups.map((invite) => (
|
||||
<Box
|
||||
|
@ -1,30 +1,25 @@
|
||||
import React from 'react';
|
||||
import { Link } from 'react-router-dom';
|
||||
import defaultApps from '~/logic/lib/default-apps';
|
||||
const routeList = defaultApps.map((e) => {
|
||||
return `/~${e}`;
|
||||
});
|
||||
|
||||
import { Box } from "@tlon/indigo-react";
|
||||
|
||||
export default class Tile extends React.Component {
|
||||
render() {
|
||||
const { bg, to, p, ...props } = this.props;
|
||||
const { to, href, p, ...props } = this.props;
|
||||
|
||||
let childElement = (
|
||||
<Box p={typeof p === 'undefined' ? 2 : p} bg={bg} width="100%" height="100%">
|
||||
<Box p={typeof p === 'undefined' ? 2 : p} width="100%" height="100%">
|
||||
{props.children}
|
||||
</Box>
|
||||
);
|
||||
|
||||
if (to) {
|
||||
if (routeList.indexOf(to) === -1) {
|
||||
childElement= (<Link to={to}>{childElement}</Link>);
|
||||
} else {
|
||||
childElement= (<a href={to}>{childElement}</a>);
|
||||
}
|
||||
|
||||
childElement= (<Link to={to}>{childElement}</Link>);
|
||||
} else if (href) {
|
||||
childElement= (<a href={href}>{childElement}</a>);
|
||||
}
|
||||
|
||||
|
||||
return (
|
||||
<Box
|
||||
|
@ -3,7 +3,7 @@ import _ from "lodash";
|
||||
import { Invites, Invite } from "~/types";
|
||||
import { Box, Col, Icon, Row, Text } from "@tlon/indigo-react";
|
||||
import GlobalApi from "~/logic/api/global";
|
||||
import { StatelessAsyncButton } from "../StatelessAsyncButton";
|
||||
import { StatelessAsyncButton } from "~/views/components/StatelessAsyncButton";
|
||||
import { cite } from "~/logic/lib/util";
|
||||
import { resourceFromPath } from "~/logic/lib/group";
|
||||
|
Loading…
Reference in New Issue
Block a user