updates root components structure

This commit is contained in:
Christoph Wolfes
2018-07-25 14:29:43 +02:00
parent 7b921da174
commit 7b37e4e9b6
34 changed files with 38 additions and 29 deletions

View File

@@ -0,0 +1,5 @@
export { default as AddButton } from "./AddButton";
export { default as Button } from "./Button";
export { default as DeleteButton } from "./DeleteButton";
export { default as EditButton } from "./EditButton";
export { default as SubmitButton } from "./SubmitButton";

View File

@@ -0,0 +1,2 @@
export { default as Checkbox } from "./Checkbox";
export { default as InputField } from "./InputField";

View File

@@ -1,6 +1,6 @@
//@flow //@flow
import React from "react"; import React from "react";
import type { Me } from "../types/Me"; import type { Me } from "../../types/Me";
type Props = { type Props = {
me?: Me me?: Me

View File

@@ -1,6 +1,6 @@
//@flow //@flow
import * as React from "react"; import * as React from "react";
import Logo from "./Logo"; import Logo from "./../Logo";
type Props = { type Props = {
children?: React.Node children?: React.Node

View File

@@ -1,7 +1,7 @@
//@flow //@flow
import * as React from "react"; import * as React from "react";
import Loading from "./Loading"; import Loading from "./../Loading";
import ErrorNotification from "./ErrorNotification"; import ErrorNotification from "./../ErrorNotification";
type Props = { type Props = {
title: string, title: string,

View File

@@ -0,0 +1,3 @@
export { default as Footer } from "./Footer";
export { default as Header } from "./Header";
export { default as Page } from "./Page";

View File

@@ -0,0 +1 @@
export { default as ConfirmAlert } from "./ConfirmAlert";

View File

@@ -1,3 +1,7 @@
//primary Navigation
export { default as PrimaryNavigation } from "./PrimaryNavigation";
export { default as PrimaryNavigationLink } from "./PrimaryNavigationLink";
//secondary Navigation
export { default as Navigation } from "./Navigation"; export { default as Navigation } from "./Navigation";
export { default as Section } from "./Section"; export { default as Section } from "./Section";
export { default as NavLink } from "./NavLink"; export { default as NavLink } from "./NavLink";

View File

@@ -6,12 +6,11 @@ import { withRouter } from "react-router-dom";
import { fetchMe } from "../modules/auth"; import { fetchMe } from "../modules/auth";
import "./App.css"; import "./App.css";
import "../components/ConfirmAlert.css"; import "../components/modals/ConfirmAlert.css";
import Header from "../components/Header"; import { PrimaryNavigation } from "../components/navigation";
import PrimaryNavigation from "../components/PrimaryNavigation";
import Loading from "../components/Loading"; import Loading from "../components/Loading";
import ErrorPage from "../components/ErrorPage"; import ErrorPage from "../components/ErrorPage";
import Footer from "../components/Footer"; import { Footer, Header } from "../components/layout";
type Props = { type Props = {
me: Me, me: Me,

View File

@@ -6,8 +6,8 @@ import { translate } from "react-i18next";
import { login } from "../modules/auth"; import { login } from "../modules/auth";
import { connect } from "react-redux"; import { connect } from "react-redux";
import InputField from "../components/InputField"; import { InputField } from "../components/forms";
import SubmitButton from "../components/SubmitButton"; import { SubmitButton } from "../components/buttons";
import classNames from "classnames"; import classNames from "classnames";
import Avatar from "../images/blib.jpg"; import Avatar from "../images/blib.jpg";

View File

@@ -1,6 +1,6 @@
// @flow // @flow
import React from "react"; import React from "react";
import Page from "../../components/Page"; import { Page } from "../../components/layout";
import { translate } from "react-i18next"; import { translate } from "react-i18next";
type Props = { type Props = {

View File

@@ -5,7 +5,7 @@ import UserForm from "./UserForm";
import type { User } from "../types/User"; import type { User } from "../types/User";
import type { History } from "history"; import type { History } from "history";
import { createUser } from "../modules/users"; import { createUser } from "../modules/users";
import Page from "../../components/Page"; import { Page } from "../../components/layout";
type Props = { type Props = {
addUser: (user: User, callback?: () => void) => void, addUser: (user: User, callback?: () => void) => void,

View File

@@ -2,8 +2,8 @@
import React from "react"; import React from "react";
import { translate } from "react-i18next"; import { translate } from "react-i18next";
import type { User } from "../types/User"; import type { User } from "../types/User";
import { confirmAlert } from "../../components/ConfirmAlert"; import { confirmAlert } from "../../components/modals/ConfirmAlert";
import { NavAction } from "../../components/SecondaryNavigation"; import { NavAction } from "../../components/navigation";
type Props = { type Props = {
user: User, user: User,

View File

@@ -4,8 +4,8 @@ import "../../tests/enzyme";
import "../../tests/i18n"; import "../../tests/i18n";
import DeleteUserButton from "./DeleteUserButton"; import DeleteUserButton from "./DeleteUserButton";
import { confirmAlert } from "../../components/ConfirmAlert"; import { confirmAlert } from "../../components/modals/ConfirmAlert";
jest.mock("../../components/ConfirmAlert"); jest.mock("../../components/modals/ConfirmAlert");
describe("DeleteUserButton", () => { describe("DeleteUserButton", () => {
it("should render nothing, if the delete link is missing", () => { it("should render nothing, if the delete link is missing", () => {

View File

@@ -2,7 +2,7 @@
import React from "react"; import React from "react";
import type { User } from "../types/User"; import type { User } from "../types/User";
import { translate } from "react-i18next"; import { translate } from "react-i18next";
import Checkbox from "../../components/Checkbox"; import { Checkbox } from "../../components/forms";
type Props = { type Props = {
user: User, user: User,

View File

@@ -1,7 +1,7 @@
//@flow //@flow
import React from "react"; import React from "react";
import { translate } from "react-i18next"; import { translate } from "react-i18next";
import EditButton from "../../components/EditButton"; import { EditButton } from "../../components/buttons";
import type { UserEntry } from "../types/UserEntry"; import type { UserEntry } from "../types/UserEntry";
type Props = { type Props = {

View File

@@ -1,7 +1,7 @@
//@flow //@flow
import React from "react"; import React from "react";
import { connect } from "react-redux"; import { connect } from "react-redux";
import Page from "../../components/Page"; import { Page } from "../../components/layout";
import { Route } from "react-router"; import { Route } from "react-router";
import Details from "./Details"; import Details from "./Details";
import EditUser from "./EditUser"; import EditUser from "./EditUser";
@@ -10,11 +10,7 @@ import type { UserEntry } from "../types/UserEntry";
import { fetchUser, deleteUser } from "../modules/users"; import { fetchUser, deleteUser } from "../modules/users";
import Loading from "../../components/Loading"; import Loading from "../../components/Loading";
import { import { Navigation, Section, NavLink } from "../../components/navigation";
Navigation,
Section,
NavLink
} from "../../components/SecondaryNavigation";
import DeleteUserButton from "./DeleteUserButton"; import DeleteUserButton from "./DeleteUserButton";
import ErrorPage from "../../components/ErrorPage"; import ErrorPage from "../../components/ErrorPage";

View File

@@ -2,9 +2,8 @@
import React from "react"; import React from "react";
import { translate } from "react-i18next"; import { translate } from "react-i18next";
import type { User } from "../types/User"; import type { User } from "../types/User";
import InputField from "../../components/InputField"; import { InputField, Checkbox } from "../../components/forms";
import Checkbox from "../../components/Checkbox"; import { SubmitButton } from "../../components/buttons";
import SubmitButton from "../../components/SubmitButton";
import Loading from "../../components/Loading"; import Loading from "../../components/Loading";
type Props = { type Props = {

View File

@@ -4,10 +4,10 @@ import { connect } from "react-redux";
import { translate } from "react-i18next"; import { translate } from "react-i18next";
import { fetchUsers, getUsersFromState } from "../modules/users"; import { fetchUsers, getUsersFromState } from "../modules/users";
import Page from "../../components/Page"; import { Page } from "../../components/layout";
import UserTable from "./UserTable"; import UserTable from "./UserTable";
import type { User } from "../types/User"; import type { User } from "../types/User";
import AddButton from "../../components/AddButton"; import { AddButton } from "../../components/buttons";
import type { UserEntry } from "../types/UserEntry"; import type { UserEntry } from "../types/UserEntry";
type Props = { type Props = {