-
-
Notifications
You must be signed in to change notification settings - Fork 725
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
feat: migrate context #2701
feat: migrate context #2701
Conversation
✅ Deploy Preview for asyncapi-website ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update the types of other contexts accordingly.
context/AppContext.tsx
Outdated
@@ -0,0 +1,2 @@ | |||
import { createContext } from 'react'; | |||
export default createContext<string>(""); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AppContext
doesn't have string data type. It is a object that contains path
variable in it.
Reference - https://github.com/asyncapi/website/blob/master/pages/_app.js#L31
@akshatnema requested changes are made |
types/context/GenericPostContext.ts
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add the type of the post according to the posts.json
data?
Reference - https://dev.to/nickytonline/strongly-typed-json-in-typescript-5gb2
types/context/BlogContext.ts
Outdated
@@ -0,0 +1,14 @@ | |||
export interface BlogContextValue { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add the Blog post type according to the data present in posts.json
.
Reference - dev.to/nickytonline/strongly-typed-json-in-typescript-5gb2
@vishvamsinh28 Kindly update the PR as we now have |
/rtm |
migrated context
related #2636