Making a simple dictionary
i have added DictionaryTitle and Dictionary on the schema and im lost T^T .... i want to connect them so when i click the title it should go in to a new page for the definition of that title is





5 Replies
You need a page that expects a
titleId
as param (https://nextjs.org/docs/pages/building-your-application/routing/dynamic-routes).
On click from your card, redirect to /somewhere/${titleId}
From there, you can now query the dictionary
table:
thank you for replying good sir .. sorry, this is my first time using drizzle kit T^T ... may i know which page should i put the titleId param how to set it up? is it on dictionary-title or on the dictionary ... im done reading the docs and im still confused T^T... im planning on using the dictionary for the discripting on the title

I think you need something like that: https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes#example
Routing: Dynamic Routes | Next.js
Dynamic Routes can be used to programmatically generate route segments from dynamic data.
I am not a nextjs expert but maybe a
app/(main)/dictionary/[title-id]/page.tsx
.i didnt do this since i dont want to get my code to be more complicated instead i created card and title ... anything to fix ???


