1import { useState, useEffect } from "react";
2import { configure, GlobalHotKeys } from "react-hotkeys";
3import { init } from "@socialgouv/matomo-next";
4import Search from "../components/Search";
5import "@urbit/foundation-design-system/styles/globals.css";
6import "@urbit/foundation-design-system/styles/markdown.css";
7import "@urbit/foundation-design-system/styles/prism.css";
9const MATOMO_URL = process?.env?.NEXT_PUBLIC_MATOMO_URL || "";
10const MATOMO_SITE_ID = process?.env?.NEXT_PUBLIC_MATOMO_SITE_ID || "";
12function MyApp({ Component, pageProps }) {
13 const [showSearch, setSearch] = useState(false);
18 siteId: MATOMO_SITE_ID,
22 const closeSearch = (event) => {
23 if (event?.preventDefault) {
24 event.preventDefault();
29 const openSearch = (event) => {
30 if (event?.preventDefault) {
31 event.preventDefault();
36 const toggleSearch = (event) => {
37 if (event?.preventDefault) {
38 event.preventDefault();
40 setSearch((state) => !state);
45 toggleSearch: ["command+k", "ctrl+k"],
49 closeSearch: (event) => closeSearch(event),
50 openSearch: (event) => openSearch(event),
51 toggleSearch: (event) => toggleSearch(event),
56 ignoreTags: ["input", "select", "textarea"],
57 ignoreEventsCondition: function () {},
62 <GlobalHotKeys keyMap={keyMap} handlers={handlers} />
64 showSearch={showSearch}
65 toggleSearch={toggleSearch}
66 closeSearch={closeSearch}
67 openSearch={openSearch}
72 toggleSearch: toggleSearch,
73 closeSearch: closeSearch,
74 openSearch: openSearch,
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list