Skip to content

Commit

Permalink
add credit and fix thing
Browse files Browse the repository at this point in the history
  • Loading branch information
kentcdodds committed May 3, 2024
1 parent e2f8425 commit ee11f7d
Show file tree
Hide file tree
Showing 21 changed files with 22 additions and 15 deletions.
1 change: 1 addition & 0 deletions exercises/04.router/01.problem.router/ui/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export function useRouter() {
return context
}

// Thanks Devon: https://twitter.com/devongovett/status/1672307153699471360
export function useLinkHandler(navigate) {
useEffect(() => {
function onClick(event) {
Expand Down
1 change: 1 addition & 0 deletions exercises/04.router/01.solution.router/ui/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export function useRouter() {
return context
}

// Thanks Devon: https://twitter.com/devongovett/status/1672307153699471360
export function useLinkHandler(navigate) {
useEffect(() => {
function onClick(event) {
Expand Down
1 change: 1 addition & 0 deletions exercises/04.router/02.problem.pending-ui/ui/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export function useRouter() {
return context
}

// Thanks Devon: https://twitter.com/devongovett/status/1672307153699471360
export function useLinkHandler(navigate) {
useEffect(() => {
function onClick(event) {
Expand Down
1 change: 1 addition & 0 deletions exercises/04.router/02.solution.pending-ui/ui/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export function useRouter() {
return context
}

// Thanks Devon: https://twitter.com/devongovett/status/1672307153699471360
export function useLinkHandler(navigate) {
useEffect(() => {
function onClick(event) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export function useRouter() {
return context
}

// Thanks Devon: https://twitter.com/devongovett/status/1672307153699471360
export function useLinkHandler(navigate) {
useEffect(() => {
function onClick(event) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export function useRouter() {
return context
}

// Thanks Devon: https://twitter.com/devongovett/status/1672307153699471360
export function useLinkHandler(navigate) {
useEffect(() => {
function onClick(event) {
Expand Down
1 change: 1 addition & 0 deletions exercises/04.router/04.problem.history/ui/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export function useRouter() {
return context
}

// Thanks Devon: https://twitter.com/devongovett/status/1672307153699471360
export function useLinkHandler(navigate) {
useEffect(() => {
function onClick(event) {
Expand Down
1 change: 1 addition & 0 deletions exercises/04.router/04.solution.history/ui/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export function useRouter() {
return context
}

// Thanks Devon: https://twitter.com/devongovett/status/1672307153699471360
export function useLinkHandler(navigate) {
useEffect(() => {
function onClick(event) {
Expand Down
1 change: 1 addition & 0 deletions exercises/04.router/05.problem.cache/ui/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export function useRouter() {
return context
}

// Thanks Devon: https://twitter.com/devongovett/status/1672307153699471360
export function useLinkHandler(navigate) {
useEffect(() => {
function onClick(event) {
Expand Down
1 change: 1 addition & 0 deletions exercises/04.router/05.solution.cache/ui/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export function useRouter() {
return context
}

// Thanks Devon: https://twitter.com/devongovett/status/1672307153699471360
export function useLinkHandler(navigate) {
useEffect(() => {
function onClick(event) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export function useRouter() {
return context
}

// Thanks Devon: https://twitter.com/devongovett/status/1672307153699471360
export function useLinkHandler(navigate) {
useEffect(() => {
function onClick(event) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export function useRouter() {
return context
}

// Thanks Devon: https://twitter.com/devongovett/status/1672307153699471360
export function useLinkHandler(navigate) {
useEffect(() => {
function onClick(event) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,24 +46,11 @@ export function ShipSearch({ search, results, fallback }) {
}

export function SelectShipLink({ shipId, highlight, children }) {
const { location, navigate } = useRouter()
const { location } = useRouter()
return h('a', {
children,
href: `/${shipId}`,
href: mergeLocationState(location, { shipId }),
style: { fontWeight: highlight ? 'bold' : 'normal' },
onClick: event => {
if (
event.ctrlKey ||
event.metaKey ||
event.shiftKey ||
event.button !== 0
) {
return
}
event.preventDefault()
const newLocation = mergeLocationState(location, { shipId })
navigate(newLocation)
},
})
}

Expand Down
1 change: 1 addition & 0 deletions exercises/05.actions/02.problem.client/ui/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export function useRouter() {
return context
}

// Thanks Devon: https://twitter.com/devongovett/status/1672307153699471360
export function useLinkHandler(navigate) {
useEffect(() => {
function onClick(event) {
Expand Down
1 change: 1 addition & 0 deletions exercises/05.actions/02.solution.client/ui/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export function useRouter() {
return context
}

// Thanks Devon: https://twitter.com/devongovett/status/1672307153699471360
export function useLinkHandler(navigate) {
useEffect(() => {
function onClick(event) {
Expand Down
1 change: 1 addition & 0 deletions exercises/05.actions/03.problem.server/ui/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export function useRouter() {
return context
}

// Thanks Devon: https://twitter.com/devongovett/status/1672307153699471360
export function useLinkHandler(navigate) {
useEffect(() => {
function onClick(event) {
Expand Down
1 change: 1 addition & 0 deletions exercises/05.actions/03.solution.server/ui/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export function useRouter() {
return context
}

// Thanks Devon: https://twitter.com/devongovett/status/1672307153699471360
export function useLinkHandler(navigate) {
useEffect(() => {
function onClick(event) {
Expand Down
1 change: 1 addition & 0 deletions exercises/05.actions/04.problem.revalidation/ui/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export function useRouter() {
return context
}

// Thanks Devon: https://twitter.com/devongovett/status/1672307153699471360
export function useLinkHandler(navigate) {
useEffect(() => {
function onClick(event) {
Expand Down
1 change: 1 addition & 0 deletions exercises/05.actions/04.solution.revalidation/ui/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export function useRouter() {
return context
}

// Thanks Devon: https://twitter.com/devongovett/status/1672307153699471360
export function useLinkHandler(navigate) {
useEffect(() => {
function onClick(event) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export function useRouter() {
return context
}

// Thanks Devon: https://twitter.com/devongovett/status/1672307153699471360
export function useLinkHandler(navigate) {
useEffect(() => {
function onClick(event) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export function useRouter() {
return context
}

// Thanks Devon: https://twitter.com/devongovett/status/1672307153699471360
export function useLinkHandler(navigate) {
useEffect(() => {
function onClick(event) {
Expand Down

0 comments on commit ee11f7d

Please sign in to comment.