mirror of
https://github.com/calli-eve/eve-pi.git
synced 2026-02-14 03:38:49 +01:00
memoize refresSession function
This commit is contained in:
@@ -1,14 +1,15 @@
|
||||
import { SessionContext } from "@/app/context/Context";
|
||||
import { CharacterContext, SessionContext } from "@/app/context/Context";
|
||||
import { Button } from "@mui/material";
|
||||
import { useContext } from "react";
|
||||
|
||||
export const RefreshButton = () => {
|
||||
const { refreshSession } = useContext(SessionContext);
|
||||
const { characters } = useContext(CharacterContext);
|
||||
return (
|
||||
<Button
|
||||
style={{ width: "100%" }}
|
||||
variant="contained"
|
||||
onClick={refreshSession}
|
||||
onClick={() => refreshSession(characters)}
|
||||
>
|
||||
Refresh
|
||||
</Button>
|
||||
|
||||
Reference in New Issue
Block a user