Skip to content

Commit

Permalink
fix: shared ref
Browse files Browse the repository at this point in the history
  • Loading branch information
SpikeHD committed Apr 8, 2024
1 parent ef87122 commit 4687c49
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 3 additions & 1 deletion backend/src/plugins/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use std::ptr::addr_of;

use crate::State;
use serde::Serialize;

Expand Down Expand Up @@ -59,7 +61,7 @@ async fn plugins_route(_req: tide::Request<State>) -> Result<tide::Response, tid
let mut res = tide::Response::new(200);

unsafe {
res.set_body(serde_json::to_vec(&PLUGINS).unwrap());
res.set_body(serde_json::to_vec(&PLUGINS.clone()).unwrap());
}

res.set_content_type("application/json");
Expand Down
6 changes: 5 additions & 1 deletion frontend/src/components/Plugins/Minecraft/Minecraft.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ interface McData {

export function Minecraft() {
const [data, setData] = useState({

description: '',
players: 0,
version: '',
latency: 0,
address: ''
} as McData)

useEffect(() => {
Expand Down

0 comments on commit 4687c49

Please sign in to comment.