1
0
Fork 0
mirror of https://github.com/kou029w/_.git synced 2025-01-31 06:18:07 +00:00

routesを切り出す

This commit is contained in:
Nebel 2019-04-24 00:29:07 +09:00
parent e90a1f65ce
commit c2d3f7ab99
2 changed files with 9 additions and 6 deletions

8
routes.ts Normal file
View file

@ -0,0 +1,8 @@
import { createElement } from "react";
import { Home, Info } from "@material-ui/icons";
const routes = [
{ pathname: "/", icon: createElement(Home) },
{ pathname: "/about", icon: createElement(Info) }
];
export default routes;

View file

@ -2,12 +2,7 @@ import React, { useState } from "react";
import { withRouter } from "next/router";
import { makeStyles } from "@material-ui/styles";
import { AppBar, Tabs, Tab } from "@material-ui/core";
import { Home, Info } from "@material-ui/icons";
export const routes = [
{ pathname: "/", icon: <Home /> },
{ pathname: "/about", icon: <Info /> }
];
import routes from "../routes";
const TopAppBar: React.FC<{ router: any }> = ({ router }) => {
const classes = makeStyles({