Skip to content

Feature/cleanup #84

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jan 31, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
cleanup router typings
  • Loading branch information
ShMcK committed Jan 29, 2020
commit 82d22a408a006cb904db6be9c7868b568b29b9c9
8 changes: 1 addition & 7 deletions web-app/src/components/Router/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import * as React from 'react'
import * as CR from 'typings'
import { createMachine } from '../../services/state/machine'
import { useMachine } from '../../services/xstate-react'
import Route from './Route'
Expand All @@ -9,11 +8,6 @@ interface Props {
children: any
}

interface CloneElementProps {
context: CR.MachineContext
send(action: CR.Action): void
}

declare let acquireVsCodeApi: any

const editor = acquireVsCodeApi()
Expand Down Expand Up @@ -41,7 +35,7 @@ const useRouter = () => {
}
}, [])

const Router = ({ children }: Props): React.ReactElement<CloneElementProps> | null => {
const Router = ({ children }: Props): React.ReactElement<any> | null => {
const childArray = React.Children.toArray(children)
for (const child of childArray) {
// match path
Expand Down