Skip to content

Commit

Permalink
Remove reloadDocument
Browse files Browse the repository at this point in the history
  • Loading branch information
pogseal committed Sep 10, 2024
1 parent 6a9b955 commit 631819e
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 10 deletions.
3 changes: 0 additions & 3 deletions app/routes/_editor+/blocks+/group/group-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ export function BlockGroupItemView({ element }: { element: GroupItemElement }) {
<>
{element.isPost && element.iconUrl ? (
<Link
reloadDocument={element?.isCustomSite ?? false}
key={element?.id}
to={element?.path ?? ""}
// prefetch="intent"
Expand Down Expand Up @@ -62,7 +61,6 @@ export function BlockGroupItemView({ element }: { element: GroupItemElement }) {
</Link>
) : (
<Link
reloadDocument={element?.isCustomSite ?? false}
key={element?.id}
to={element?.path ?? ""}
// prefetch="intent"
Expand Down Expand Up @@ -138,7 +136,6 @@ export function BlockGroupItemView({ element }: { element: GroupItemElement }) {
</button>
)}
<NavLink
reloadDocument={element?.isCustomSite ?? false}
key={element?.id}
to={element?.path ?? ""}
// prefetch="intent"
Expand Down
4 changes: 1 addition & 3 deletions app/routes/_home+/components/Discover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { useDebouncedValue } from "~/utils/use-debounce";
import type { loader } from "../_index";

export function Discover() {
const { q, sites, dev } = useLoaderData<typeof loader>() || {};
const { q, sites } = useLoaderData<typeof loader>() || {};

const [query, setQuery] = useState(q);
const debouncedValue = useDebouncedValue(query, 500);
Expand Down Expand Up @@ -167,8 +167,6 @@ export function Discover() {
) : (
sites?.docs.map((site: Site) => (
<Link
//don't reload document on dev
reloadDocument={!dev}
to={
site.domain
? `https://${site.domain}`
Expand Down
1 change: 0 additions & 1 deletion app/routes/_site+/_components/MobileHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,6 @@ export function MobileHeader() {
</div>
)}
<Link
reloadDocument={true}
className="my-4 rounded-xl bg-zinc-800 px-5 py-3
text-center text-sm font-bold text-white dark:bg-zinc-200 dark:text-zinc-700"
to="https://mana.wiki"
Expand Down
4 changes: 1 addition & 3 deletions app/routes/_site+/_components/SiteHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {
Transition,
} from "@headlessui/react";
import { Link, useFetcher, useLoaderData } from "@remix-run/react";
import clsx from "clsx";
import { useTranslation } from "react-i18next";
import { InstantSearch } from "react-instantsearch";

Expand All @@ -24,9 +23,9 @@ import type { loader as siteLoaderType } from "~/routes/_site+/_layout";
import { isAdding } from "~/utils/form";

import { MenuTrayContent, MobileTray } from "./MobileTray";
import { DarkModeToggle } from "../action+/theme-toggle";
import { searchClient } from "../search/_search";
import { Autocomplete } from "../search/components/Autocomplete";
import { DarkModeToggle } from "../action+/theme-toggle";

export function SiteHeader({
setPrimaryMenuOpen,
Expand Down Expand Up @@ -198,7 +197,6 @@ export function SiteHeader({
<div className="flex items-center">
<Link
// prefetch="intent"
reloadDocument={true}
to={`/login?redirectTo=/`}
className="flex h-9 items-center justify-center rounded-full bg-zinc-700 px-3.5
text-sm font-bold text-white dark:bg-white dark:text-black max-laptop:hidden"
Expand Down

0 comments on commit 631819e

Please sign in to comment.