minor / add button to footer to get new random messages

This commit is contained in:
2025-07-25 09:54:22 -04:00
parent 3d35b0a327
commit 3ea7142b24
3 changed files with 16 additions and 4 deletions

View File

@@ -1,5 +1,7 @@
import { API_URL } from "../config";
import { default as $ } from "jquery";
import ReplayIcon from '@mui/icons-material/Replay';
var randomMsg;
@@ -18,10 +20,21 @@ const getRandomMsg = () => {
});
}
window.getRandomMsg = getRandomMsg; // for global usage
export default function RandomMsg() {
getRandomMsg();
return (
<div className="random-msg">
<div className="random-msg-container">
<div className="random-msg">
</div>
<button id="new-msg"
aria-label="New footer message"
type="button"
className="flex items-center justify-center px-2 py-1 rounded-md hover:bg-neutral-200 dark:hover:bg-neutral-800 transition-opacity new-msg-button"
onClick={() => getRandomMsg()}>
<ReplayIcon size="sm" />
</button>
</div>
);
}