Skip to content

Commit

Permalink
chore: show login modal after first change without login
Browse files Browse the repository at this point in the history
  • Loading branch information
NiklasBuchfink committed Jun 6, 2024
1 parent f4f7aba commit 4a07ec8
Showing 1 changed file with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -225,11 +225,13 @@ export const Gitfloat = () => {
}
}

createEffect(on(triggerAddNinja, () => {
if (triggerAddNinja() === true) {
addNinja(triggerPushChanges)
}
}))
createEffect(
on(triggerAddNinja, () => {
if (triggerAddNinja() === true) {
addNinja(triggerPushChanges)
}
})
)

const pullrequestUrl = () => {
const repoInfo = githubRepositoryInformation()
Expand Down Expand Up @@ -314,13 +316,13 @@ export const Gitfloat = () => {

// prevent user from making to changes when not logged in
createEffect(() => {
if (gitState() === "login" && localChanges() > 2) setSignInModalOpen(true)
if (gitState() === "login" && localChanges() >= 1) setSignInModalOpen(true)
})

const debouncedForkModalState = debounce(2000, () => {
if (gitState() === "hasChanges") {
setForkModalOpen(false)
} else if (gitState() === "fork" && localChanges() > 2) {
} else if (gitState() === "fork" && localChanges() >= 1) {
setForkModalOpen(true)
}
})
Expand Down

0 comments on commit 4a07ec8

Please sign in to comment.