like-gold
like-gold13mo ago

How to use `<AntdInferencer />` with Next.js

Hello, the examples provided in the docs for using the inferencer components is using some <Routes>,<Route> components from react-router-dom package, while we are using next.js. What is the proper way to add Inferencer:
<Routes>
<Route
element={
<ThemedLayoutV2>
<Outlet />
</ThemedLayoutV2>
}>
<Route path="admin/post" element={<AntdInferencer />}/>
<Route path="admin/friends" element={<AntdInferencer />}/>
...
</Route>
</Routes>
<Routes>
<Route
element={
<ThemedLayoutV2>
<Outlet />
</ThemedLayoutV2>
}>
<Route path="admin/post" element={<AntdInferencer />}/>
<Route path="admin/friends" element={<AntdInferencer />}/>
...
</Route>
</Routes>
But for Next.js?
3 Replies
kapa.ai
kapa.ai13mo ago
Hi @bombillazo. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Hmm, I don't know enough to give you a confident answer yet about integrating Inferencer with Next.js specifically. The provided extracts only cover examples using react-router-dom. However, you can refer to the refine documentation for more information and examples: Refine Docs (https://refine.dev/docs). ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai13mo ago
<@260960777010151436> kapa.ai is still learning and improving, please let us how it did by reacting below
absent-sapphire
absent-sapphire13mo ago
Hello @bombillazo , you can create a page normally as you create with NextJs and export use <AntdInferencer /> component inside page's function. src/pages/posts
const Posts = () => <AntdInferencer />

export default Posts
const Posts = () => <AntdInferencer />

export default Posts