Get and replace data in database

I wanna sent hints to another page on my website which only contains a text (the hint).
To sent hints I use a form which has to sent the data to the database and replace it. So basicly you type in your hint in the form, then you press the sent hint button which will replace the last hint in the database. Then the other page gets the updated hint every 5 seconds (if there is something like an onchange event would be even beter).

Hint receiver page:

I tried something like this to get the hint from the database but doesn’t work.

import wixData from ‘wix-data’ ;
import wixLocation from ‘wix-location’ ;

$w.onReady( function () {

setTimeout(() => { 

let dataQuery = wixData.query( ‘hints’ )
dataQuery.find().then((result) => {
$w( ‘#text1’ ).text = result.hint[ 0 ]
})
}, 5000 );
});

Sent hint page

To post to database i tried something like this:

import wixData from ‘wix-data’ ;
import wixLocation from ‘wix-location’ ;

$w.onReady( function () {
});

export function button1_click(event) {
let dataQuery = wixData.query( ‘hints’ )
dataQuery.find().then((result) => {
result.hint = $w( ‘#textBox1’ ).value
})
}

Database looks like this

Any help would be great!