diff --git a/src/App.tsx b/src/App.tsx index 2a92919..f1086d8 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -2,7 +2,8 @@ import { RecoilRoot } from 'recoil' import Mutuals from "./components/Mutuals" import Card from "./components/Card" -import Menu from "./components/Menu" +import VerticalMenu from "./components/VerticalMenu" +import HorizontalMenu from "./components/HorizontalMenu" import ContentRenderer from "./components/ContentRenderer" import Footer from "./components/Footer" @@ -71,7 +72,10 @@ export default function App() {
- + +
+
+
diff --git a/src/components/ContentRenderer.tsx b/src/components/ContentRenderer.tsx index abaf803..3f56ac0 100644 --- a/src/components/ContentRenderer.tsx +++ b/src/components/ContentRenderer.tsx @@ -6,7 +6,7 @@ import Keys from "./Keys" import Spotify from "./Spotify" import Services from "./Services" -import { currentPage, Pages } from "./Menu" +import { currentPage, Pages } from "./VerticalMenu" diff --git a/src/components/HorizontalMenu.tsx b/src/components/HorizontalMenu.tsx new file mode 100644 index 0000000..3cd0e07 --- /dev/null +++ b/src/components/HorizontalMenu.tsx @@ -0,0 +1,55 @@ +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' +import { faUser, faStar} from '@fortawesome/free-regular-svg-icons' +import { faLink, faKey } from '@fortawesome/free-solid-svg-icons' + +import { RecoilRoot, atom, useRecoilState } from 'recoil' + +export enum Pages { + Profile = 0, + Links = 1, + Keys = 2, + Activities = 3, + Spotify = 4, + Services = 5, + } + +export const currentPage = atom({ + key: 'page', + default: Pages.Profile, +}) + +export default function HorizontalMenu() { + const [page, setPage] = useRecoilState(currentPage); + + return ( + +
+
{setPage(Pages.Profile)}} + > + {" "} +
+
{setPage(Pages.Links)}} + > + {" "} +
+
{setPage(Pages.Keys)}} + > + {" "} +
+
{setPage(Pages.Services)}} + > + {" "} +
+
+
+ ) + } + \ No newline at end of file diff --git a/src/components/Menu.tsx b/src/components/VerticalMenu.tsx similarity index 76% rename from src/components/Menu.tsx rename to src/components/VerticalMenu.tsx index 5557c3a..912bc8b 100644 --- a/src/components/Menu.tsx +++ b/src/components/VerticalMenu.tsx @@ -18,35 +18,35 @@ export const currentPage = atom({ default: Pages.Profile, }) -export default function Menu() { +export default function VerticalMenu() { const [page, setPage] = useRecoilState(currentPage); return (
  • {setPage(Pages.Profile)}} > {" "}

    プロフィール

  • {setPage(Pages.Links)}} > {" "}

    リンク

  • {setPage(Pages.Keys)}} > {" "}

    公開鍵

  • {setPage(Pages.Services)}} > {" "}