Skip to content

Commit

Permalink
testswr
Browse files Browse the repository at this point in the history
  • Loading branch information
szweibel committed Sep 14, 2023
1 parent 159dff9 commit bab8ea6
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions components/UseWorkshop.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import useSWRImmutable, {mutate} from "swr/immutable";
import useSWRImmutable from "swr/immutable";
import { mutate } from "swr";
import { useState, useEffect } from "react";

export default function useWorkshop(gitUser, builtURL, editing){
Expand Down Expand Up @@ -46,12 +47,15 @@ export default function useWorkshop(gitUser, builtURL, editing){
revalidateOnFocus: false,
revalidateOnReconnect: false,
revalidateIfStale: false,
revalidateOnMount: true
// revalidateOnMount: true
})

if (editing) {
mutate()
}

useEffect(() => {
if (editing) {
mutate()
}
}, [editing])

return data

Expand Down

0 comments on commit bab8ea6

Please sign in to comment.