Dynamic route data updating problem
Unanswered
Jindo posted this in #help-forum
JindoOP
so basicly i changed one like feild of my data base and one component got updated but another one refuse to update and just no matter what i do it just uses the old data
this is what this compenent uses
this is what all the other components uses which is the updated data
export const dynamic = 'force-dynamic';
export default async function page({params}) {
const pb = new PocketBase('http://127.0.0.1:8090');
const record = await pb.collection('items').getOne(params.itemid)
const photos = record.photos
console.log(record.name);
return (
<div className="flex flex-col">
<Link href={"/"} className="flex justify-center items-center py-1 m-2 hover:bg-blue-500 transition-all active:scale-95 px-4 bg-blue-400 w-24 rounded-md"><span className="text-white font-medium text-lg mr-2">Back</span><Image src={"/back-arrow.svg"} width={20} height={20}/></Link>
<div className="w-full flex flex-col justify-center items-center">
<img src={pb.files.getUrl(record, photos[0], {'thumb': '100x250'})} className="w-[90%] rounded-lg shadow-xl"/>
<div></div></div></div>)} this is what this compenent uses
{
big_desc: null,
collectionId: 'bfh80zq13hn96yq',
collectionName: 'items',
desc: 'Vimukthi for sale',
discount_price: 20,
id: 'pu09ii0mtph1e38',
itemid: 1,
model: 'human',
name: 'Vimukthi',
photos: [ 'screenshot_2024_08_02_161142_DyjVPIfmYj.png' ],
price: 10,
type: 'dumb fuck',
updated: '2024-08-19 18:51:46.642Z'
}this is what all the other components uses which is the updated data
{
big_desc: null,
collectionId: 'bfh80zq13hn96yq',
collectionName: 'items',
desc: 'Vimukthi for sale',
discount_price: 20,
id: 'pu09ii0mtph1e38',
itemid: 1,
model: 'human',
name: 'Vimukthi for sale',
photos: [
'screenPIfmYj.png',
'b74b6919306618Cww.jpg',
'images_1_pBf3BtUWn9.jpg',
'images_uWgRib5oK6.jpg'
],
price: 10,
type: 'dumb fuck',
updated: '2024-08-20 18:08:19.373Z'
}5 Replies
JindoOP
and also
u cant just rebuild it for every single data base change
and this only happens to this component under the only dynamic route that existes right now
and other components doesnt have this problem
they update just fine