Skip to content

Commit 760aeab

Browse files
committed
fix: Fix some bugs
1 parent b9de211 commit 760aeab

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

apps/app/src/components/ActiveLink.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,20 @@ import { LinkWithQuery } from "./LinkWithQuery/LinkWithQuery";
77

88
type ActiveLinkProps = Readonly<{
99
activeClassName: string;
10+
activeHref?: string;
1011
}> &
1112
ComponentProps<typeof LinkWithQuery>;
1213

13-
export const ActiveLink = ({ href, className, activeClassName, ...props }: ActiveLinkProps) => {
14+
export const ActiveLink = ({
15+
href,
16+
className,
17+
activeClassName,
18+
activeHref,
19+
...props
20+
}: ActiveLinkProps) => {
1421
const pathname = usePathname();
1522

16-
const isActive = pathname?.startsWith(href.toString());
23+
const isActive = pathname?.startsWith(activeHref ? activeHref.toString() : href.toString());
1724

1825
return (
1926
<LinkWithQuery

apps/app/src/components/QuestionsSidebar/TechnologyFilter/Technology.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ export const Technology = ({ href, title, icon }: TechnologyProps) => (
1212
className="flex min-h-[85px] min-w-[85px] cursor-pointer flex-col items-center justify-center rounded-lg bg-white shadow-[0px_1px_4px] shadow-neutral-400 transition-colors hover:bg-violet-50 dark:bg-white-dark dark:shadow-neutral-900 hover:dark:bg-violet-900 small-filters:h-14 small-filters:min-h-[unset] small-filters:w-14 small-filters:min-w-[unset] small-filters:[&>svg]:h-7 small-filters:[&>svg]:w-7"
1313
activeClassName="border border-primary bg-violet-50 dark:bg-violet-900"
1414
title={title}
15-
href={`/questions/${href}`}
15+
href={`/questions/${href}/1`}
16+
activeHref={`/questions/${href}`}
1617
mergeQuery
1718
>
1819
<span className="text-sm text-neutral-500 dark:text-neutral-200 small-filters:text-xs">

apps/app/src/lib/fetcher.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,5 @@ fetcher.configure({
77
baseUrl: process.env.NEXT_PUBLIC_API_URL,
88
init: {
99
credentials: "include",
10-
next: {
11-
revalidate: 60,
12-
},
13-
cache: "force-cache",
1410
},
1511
});

0 commit comments

Comments
 (0)