From 44277ddc3c61f2e1bc3dbdd7274d6a328f1ae0fe Mon Sep 17 00:00:00 2001 From: Kyle Doherty <kyle.l.doherty@gmail.com> Date: Mon, 2 Jul 2018 11:20:29 -0700 Subject: [PATCH] lint --- .../src/metabase/components/BrowseApp.jsx | 30 +++++++++++-------- .../src/metabase/components/BrowserCrumbs.jsx | 7 +---- .../metabase/components/CollectionLanding.jsx | 4 --- .../metabase/nav/components/ProfileLink.jsx | 3 +- .../src/metabase/nav/containers/Navbar.jsx | 1 - 5 files changed, 19 insertions(+), 26 deletions(-) diff --git a/frontend/src/metabase/components/BrowseApp.jsx b/frontend/src/metabase/components/BrowseApp.jsx index 477c0be53eb..7a5e88d8a8e 100644 --- a/frontend/src/metabase/components/BrowseApp.jsx +++ b/frontend/src/metabase/components/BrowseApp.jsx @@ -66,7 +66,7 @@ export class SchemaBrowser extends React.Component { mb={1} hover={{ color: normal.purple }} > - <Card hoverable> + <Card hoverable px={1}> <EntityItem name={schema.name} iconName="folder" @@ -98,16 +98,18 @@ export class TableBrowser extends React.Component { {({ tables, loading, error }) => { return ( <Box> - <BrowserCrumbs - crumbs={[ - { title: t`Your data`, to: "browse" }, - { - title: <DatabaseName dbId={dbId} />, - to: `browse/${dbId}`, - }, - schemaName != null && { title: schemaName }, - ]} - /> + <Box my={2}> + <BrowserCrumbs + crumbs={[ + { title: t`Your data`, to: "browse" }, + { + title: <DatabaseName dbId={dbId} />, + to: `browse/${dbId}`, + }, + schemaName != null && { title: schemaName }, + ]} + /> + </Box> <Grid> {tables.map(table => { const link = Question.create({ @@ -118,7 +120,7 @@ export class TableBrowser extends React.Component { return ( <GridItem w={1 / 3}> <Link to={link} mb={1} hover={{ color: normal.purple }}> - <Card hoverable> + <Card hoverable px={1}> <EntityItem item={table} name={table.display_name || table.name} @@ -150,7 +152,9 @@ export class DatabaseBrowser extends React.Component { render() { return ( <Box> - <BrowserCrumbs crumbs={[{ title: t`Your data` }]} /> + <Box my={2}> + <BrowserCrumbs crumbs={[{ title: t`Your data` }]} /> + </Box> <DatabaseListLoader> {({ databases, loading, error }) => { return ( diff --git a/frontend/src/metabase/components/BrowserCrumbs.jsx b/frontend/src/metabase/components/BrowserCrumbs.jsx index 3a7dc1e6cfb..af343b61424 100644 --- a/frontend/src/metabase/components/BrowserCrumbs.jsx +++ b/frontend/src/metabase/components/BrowserCrumbs.jsx @@ -1,15 +1,10 @@ import React from "react"; -import { Box, Flex } from "grid-styled"; +import { Flex } from "grid-styled"; import Icon from "metabase/components/Icon"; import Link from "metabase/components/Link"; -import Subhead from "metabase/components/Subhead"; // TODO: merge with Breadcrumbs -const BrowseHeader = ({ children }) => ( - <h2 style={{ fontWeight: 900 }}>{children}</h2> -); - const Crumb = ({ children }) => ( <h5 className="text-uppercase text-brand-hover" diff --git a/frontend/src/metabase/components/CollectionLanding.jsx b/frontend/src/metabase/components/CollectionLanding.jsx index 4a0cf3aa149..d94eb448155 100644 --- a/frontend/src/metabase/components/CollectionLanding.jsx +++ b/frontend/src/metabase/components/CollectionLanding.jsx @@ -94,10 +94,6 @@ class DefaultLanding extends React.Component { onSelectNone(); }; - // Show the - const showCollectionList = - collectionId === "root" || collections.length > 0; - return ( <Box> <Box> diff --git a/frontend/src/metabase/nav/components/ProfileLink.jsx b/frontend/src/metabase/nav/components/ProfileLink.jsx index f10e6711cbb..c1d20856067 100644 --- a/frontend/src/metabase/nav/components/ProfileLink.jsx +++ b/frontend/src/metabase/nav/components/ProfileLink.jsx @@ -54,10 +54,9 @@ export default class ProfileLink extends Component { } render() { - const { user, context } = this.props; + const { context } = this.props; const { modalOpen } = this.state; const { tag, date, ...versionExtra } = MetabaseSettings.get("version"); - const isRoot = user.is_superuser; const admin = context === "admin"; return ( <Box> diff --git a/frontend/src/metabase/nav/containers/Navbar.jsx b/frontend/src/metabase/nav/containers/Navbar.jsx index 2f23bc91bc8..93463e1ded8 100644 --- a/frontend/src/metabase/nav/containers/Navbar.jsx +++ b/frontend/src/metabase/nav/containers/Navbar.jsx @@ -138,7 +138,6 @@ class SearchBar extends React.Component { } const MODAL_NEW_DASHBOARD = "MODAL_NEW_DASHBOARD"; -const MODAL_NEW_COLLECTION = "MODAL_NEW_COLLECTION"; @connect(mapStateToProps, mapDispatchToProps) export default class Navbar extends Component { -- GitLab