Compare commits
2 Commits
a60d500b76
...
48a45b5447
| Author | SHA1 | Date | |
|---|---|---|---|
| 48a45b5447 | |||
| 5bd6331ad9 |
@@ -54,7 +54,13 @@ export default function Playground() {
|
|||||||
}
|
}
|
||||||
return 14;
|
return 14;
|
||||||
});
|
});
|
||||||
const [bulkRounds, setBulkRounds] = useState(1000);
|
const [bulkRounds, setBulkRounds] = useState(() => {
|
||||||
|
if (typeof window !== "undefined") {
|
||||||
|
const saved = localStorage.getItem("playground-bulkRounds");
|
||||||
|
return saved ? parseInt(saved, 10) : 1000;
|
||||||
|
}
|
||||||
|
return 1000;
|
||||||
|
});
|
||||||
const [selectedAgent, setSelectedAgent] = useState(() => {
|
const [selectedAgent, setSelectedAgent] = useState(() => {
|
||||||
if (typeof window !== "undefined") {
|
if (typeof window !== "undefined") {
|
||||||
const saved = localStorage.getItem("playground-selectedAgent");
|
const saved = localStorage.getItem("playground-selectedAgent");
|
||||||
@@ -141,6 +147,16 @@ export default function Playground() {
|
|||||||
}
|
}
|
||||||
}, [fontSize]);
|
}, [fontSize]);
|
||||||
|
|
||||||
|
// Save bulk rounds to localStorage
|
||||||
|
useEffect(() => {
|
||||||
|
if (typeof window !== "undefined") {
|
||||||
|
localStorage.setItem(
|
||||||
|
"playground-bulkRounds",
|
||||||
|
bulkRounds.toString()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}, [bulkRounds]);
|
||||||
|
|
||||||
// Save selected agent to localStorage
|
// Save selected agent to localStorage
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (typeof window !== "undefined") {
|
if (typeof window !== "undefined") {
|
||||||
|
|||||||
Reference in New Issue
Block a user