1import React, { createContext, useContext, forwardRef } from 'react';
3import useHostingStore from './lib/useHostingStore';
5export const HostingContext = createContext(null);
7export function HostingProvider({ children }) {
8 const store = useHostingStore('');
10 <HostingContext.Provider value={store}>{children}</HostingContext.Provider>
14export function useHosting() {
15 return useContext(HostingContext);
18export const withHosting = Component =>
19 forwardRef((props, ref) => (
20 <HostingContext.Consumer>
21 {store => <Component ref={ref} {...store} {...props} />}
22 </HostingContext.Consumer>
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