Skip to content
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

Add RouterProvided interface for history, location, match props #417

Merged
merged 3 commits into from Aug 3, 2019

Conversation

@adrw
Copy link
Collaborator

commented Aug 2, 2019

No description provided.

extends IDispatchSimpleForm,
IDispatchSimpleNetwork,
IDispatchPaletteExemplar {}
extends IRouterProvidedProps,

This comment has been minimized.

Copy link
@adrw

adrw Aug 2, 2019

Author Collaborator

The needed change for any Misk-Web tab that now wants typed access to history, location, or match

This comment has been minimized.

Copy link
@aashnisshah

aashnisshah Aug 2, 2019

Collaborator

nit: can we alphabetize these

@@ -19,9 +19,9 @@
preload></script>

<!-- Tabs -->
<script type="text/javascript"
<!-- <script type="text/javascript"

This comment has been minimized.

Copy link
@aashnisshah

aashnisshah Aug 2, 2019

Collaborator

was commenting this intentional?

This comment has been minimized.

Copy link
@adrw

adrw Aug 3, 2019

Author Collaborator

Good catch, thanks!

@@ -1,26 +1,24 @@
import { H1 } from "@blueprintjs/core"
import * as React from "react"
export const HowToComponent = () => {
return (

This comment has been minimized.

Copy link
@aashnisshah

aashnisshah Aug 2, 2019

Collaborator

Why did this change?

This comment has been minimized.

Copy link
@adrw

adrw Aug 3, 2019

Author Collaborator

Inlines the return for a simpler code block since the entire return is JSX and there's no typescript orchestration code before it.

import { CodePreContainer } from '@misk/core';

const LinkComponent = (props: IRouterProvidedProps) => {
if (props.match) {

This comment has been minimized.

Copy link
@aashnisshah

aashnisshah Aug 2, 2019

Collaborator

Not sure I'm following the significance of this. if props.match, why would we swap to using an a link instead of Link?

This comment has been minimized.

Copy link
@adrw

adrw Aug 3, 2019

Author Collaborator

This is an unfortunate hack in place to pass tests that complain of a tag being used outside of a router.

@aashnisshah
Copy link
Collaborator

left a comment

This looks awesome!

@adrw adrw force-pushed the adrw:adrw/20190801.match branch from 70c2bcc to d3a6d5f Aug 3, 2019

@adrw adrw force-pushed the adrw:adrw/20190801.match branch from d3a6d5f to 1e21a7c Aug 3, 2019

@adrw adrw merged commit 9b31fba into cashapp:master Aug 3, 2019

3 checks passed

ci/circleci: docs Your tests passed on CircleCI!
Details
ci/circleci: java Your tests passed on CircleCI!
Details
ci/circleci: node Your tests passed on CircleCI!
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.