1import "tailwindcss/tailwind.css";
2import { useState, useEffect } from "react";
3import { configure, GlobalHotKeys } from "react-hotkeys";
4import { init } from "@socialgouv/matomo-next";
5import Search from "../components/Search";
6import "../styles/globals.css";
7import "../styles/markdown.css";
8import "../styles/prism.css";
10const MATOMO_URL = process.env.NEXT_PUBLIC_MATOMO_URL;
11const MATOMO_SITE_ID = process.env.NEXT_PUBLIC_MATOMO_SITE_ID;
13function MyApp({ Component, pageProps }) {
14 const [showSearch, setSearch] = useState(false);
19 siteId: MATOMO_SITE_ID,
23 const closeSearch = (event) => {
24 if (event?.preventDefault) {
25 event.preventDefault();
30 const openSearch = (event) => {
31 if (event?.preventDefault) {
32 event.preventDefault();
37 const toggleSearch = (event) => {
38 if (event?.preventDefault) {
39 event.preventDefault();
41 setSearch((state) => !state);
46 toggleSearch: ["command+k", "ctrl+k"],
50 closeSearch: (event) => closeSearch(event),
51 openSearch: (event) => openSearch(event),
52 toggleSearch: (event) => toggleSearch(event),
57 ignoreTags: ["input", "select", "textarea"],
58 ignoreEventsCondition: function () {},
63 <GlobalHotKeys keyMap={keyMap} handlers={handlers} />
65 showSearch={showSearch}
66 toggleSearch={toggleSearch}
67 closeSearch={closeSearch}
68 openSearch={openSearch}
73 toggleSearch: toggleSearch,
74 closeSearch: closeSearch,
75 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