-
+
>
);
}
-
-export function NavigationLink({
- href,
- children,
- onClick,
-}: NavigationLinkProps) {
- const pathname = usePathname(); // Use usePathname hook to get the current path
- const isActive = pathname === href;
- return (
-
-
- {children}
-
-
- );
-}
diff --git a/src/app/components/NavigationLink.tsx b/src/app/components/NavigationLink.tsx
new file mode 100644
index 0000000..baf5df1
--- /dev/null
+++ b/src/app/components/NavigationLink.tsx
@@ -0,0 +1,28 @@
+import classNames from 'classnames';
+import Link, { LinkProps } from 'next/link';
+import { usePathname } from 'next/navigation';
+import styles from '../styles/Home.module.scss';
+
+interface NavigationLinkProps extends Pick
{
+ children: React.ReactNode;
+}
+
+export function NavigationLink({
+ href,
+ children,
+ onClick,
+}: NavigationLinkProps) {
+ const pathname = usePathname(); // Use usePathname hook to get the current path
+ const isActive = pathname === href;
+ return (
+
+
+ {children}
+
+
+ );
+}
diff --git a/src/app/components/UsaBanner.tsx b/src/app/components/UsaBanner.tsx
index 217638e..0738f4c 100644
--- a/src/app/components/UsaBanner.tsx
+++ b/src/app/components/UsaBanner.tsx
@@ -11,13 +11,10 @@ import {
MediaBlockBody,
Icon,
} from '@trussworks/react-uswds';
+import { dotGovIcon, flagImg, httpsIcon } from '../utils/constants';
export default function USABanner() {
- const basePath: string = '/dibbs-site';
const [isOpen, setIsOpen] = useState(false);
- const flagImg: string = `${basePath}/images/us-flag.png`;
- const dotGovIcon: string = `${basePath}/images/us-gov-icon.svg`;
- const httpsIcon: string = `${basePath}/images/https-icon.svg`;
return (
) {
return (
-
-
+
{children}
diff --git a/src/app/page.tsx b/src/app/page.tsx
index 34472ca..6667fc4 100644
--- a/src/app/page.tsx
+++ b/src/app/page.tsx
@@ -1,10 +1,9 @@
import MarkdownContent from './components/MarkdownComponent';
import { Grid } from '@trussworks/react-uswds';
import Image from 'next/image';
+import { basePath } from './utils/constants';
export default async function Home() {
- const basePath = '/dibbs-site';
-
return (
<>
diff --git a/src/app/utils/constants.ts b/src/app/utils/constants.ts
new file mode 100644
index 0000000..d37743d
--- /dev/null
+++ b/src/app/utils/constants.ts
@@ -0,0 +1,6 @@
+const basePath = '/dibbs-site';
+const flagImg = `${basePath}/images/us-flag.png`;
+const dotGovIcon = `${basePath}/images/us-gov-icon.svg`;
+const httpsIcon = `${basePath}/images/https-icon.svg`;
+
+export { basePath, flagImg, dotGovIcon, httpsIcon };