mirror of
https://github.com/kou029w/_.git
synced 2025-01-31 06:18:07 +00:00
routesを切り出す
This commit is contained in:
parent
e90a1f65ce
commit
c2d3f7ab99
2 changed files with 9 additions and 6 deletions
8
routes.ts
Normal file
8
routes.ts
Normal 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;
|
|
@ -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({
|
||||
|
|
Loading…
Add table
Reference in a new issue