Skip to content

Commit

Permalink
Merge pull request #399 from iFixit/default-draft-pulls
Browse files Browse the repository at this point in the history
Default draft pulls toggle to off
  • Loading branch information
deltuh-vee authored Dec 5, 2023
2 parents 51692bc + 5cac890 commit 692e0f3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions frontend/src/navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export function Navbar(props: NavBarProps) {
"external_block",
true
);
const [showDrafts, toggleShowDrafts] = useBoolUrlState("drafts", true);
const [showDrafts, toggleShowDrafts] = useBoolUrlState("drafts", false);
const [showPersonalView , togglePersonalView] = useBoolUrlState("personal", false);
const hideBelowMedium = ["none", "none", "block"];
const hideBelowLarge = ["none", "none", "none", "block"];
Expand All @@ -75,7 +75,7 @@ export function Navbar(props: NavBarProps) {
[showExtBlocked]
);
useEffect(
() => setPullFilter("drafts", showDrafts ? null : isNotDraft),
() => setPullFilter("drafts", showDrafts ? null : isNotDraftOrMine),
[showDrafts]
);
useEffect(
Expand Down Expand Up @@ -225,8 +225,8 @@ function isNotExternallyBlocked(pull: Pull): boolean {
return !pull.getLabel("external_block");
}

function isNotDraft(pull: Pull): boolean {
return !pull.isDraft();
function isNotDraftOrMine(pull: Pull): boolean {
return !pull.isDraft() || pull.isMine();
}

function isMineViaAffiliation(pull: Pull): boolean {
Expand Down

0 comments on commit 692e0f3

Please sign in to comment.