Skip to content

Commit

Permalink
Fix match
Browse files Browse the repository at this point in the history
  • Loading branch information
rkyslyy committed Jul 2, 2024
1 parent b8d8abb commit c041945
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions web/app/sample-protected-route/lib/ui/Greet.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
'use client'

import * as GQL from '../../../../../common/graphql/generated/gql'
import { useMutation } from '@apollo/client'
import { graphql } from '@common/generated/graphql'

const greetMutation = graphql('mutation Greet($name: String!) {\n greet(name: $name) {\n greeting\n }\n}')

export const Greet = () => {
const [greet, { data: greetResult, loading }] = GQL.useGreetMutation()
const [greet, { data: greetResult, loading }] = useMutation(greetMutation)

return (
<div className="flex flex-col items-center justify-center h-screen">
Expand Down
2 changes: 1 addition & 1 deletion web/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ export default NextAuth(authConfig).auth
export const config = {
// require login for these paths
// https://nextjs.org/docs/app/building-your-application/routing/middleware
matcher: ['/sample/:path'],
matcher: ['/sample-protected-route/:path'],
}

0 comments on commit c041945

Please sign in to comment.