Skip to content

Commit

Permalink
Refresh CM fix
Browse files Browse the repository at this point in the history
  • Loading branch information
GottliebGlob committed Aug 5, 2022
1 parent 7070093 commit 6c342bd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 15 deletions.
14 changes: 0 additions & 14 deletions .env.example

This file was deleted.

13 changes: 12 additions & 1 deletion src/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ export const MintPage = (props: HomeProps) => {
const [endDate, setEndDate] = useState<Date>();
const [isPresale, setIsPresale] = useState(false);
const [isWLOnly, setIsWLOnly] = useState(false);
const [refreshFlag, setRefreshFlag] = useState(false)

const [alertState, setAlertState] = useState<AlertState>({
open: false,
Expand Down Expand Up @@ -469,9 +470,19 @@ export const MintPage = (props: HomeProps) => {
props.connection,
isEnded,
isPresale,
refreshCandyMachineState
refreshCandyMachineState,
refreshFlag
]);

useEffect(
() => {
let timer1 = setInterval(() => setRefreshFlag(!refreshFlag), 5000);
return () => {
clearInterval(timer1);
};
},
[refreshFlag]
);


const mobileMarker = isMobile()
Expand Down

0 comments on commit 6c342bd

Please sign in to comment.