From f3b4e1d064f5abb3690f078a75813e38c8d1219e Mon Sep 17 00:00:00 2001 From: Ilia Mashkov Date: Fri, 24 Apr 2026 10:07:25 +0300 Subject: [PATCH] refactor: extract contact links to shared config --- src/shared/lib/config.ts | 21 +++++++++++++++++++++ src/shared/lib/index.ts | 1 + src/widgets/Navigation/ui/SidebarNav.tsx | 10 +++++----- src/widgets/Navigation/ui/UtilityBar.tsx | 5 +++-- 4 files changed, 30 insertions(+), 7 deletions(-) create mode 100644 src/shared/lib/config.ts diff --git a/src/shared/lib/config.ts b/src/shared/lib/config.ts new file mode 100644 index 0000000..c758370 --- /dev/null +++ b/src/shared/lib/config.ts @@ -0,0 +1,21 @@ +/** + * Static contact and social links shown in navigation. + */ +export const CONTACT_LINKS = { + /** + * Primary contact email address + */ + email: 'hello@allmy.work', + /** + * LinkedIn profile URL + */ + linkedin: 'https://linkedin.com', + /** + * Instagram profile URL + */ + instagram: 'https://instagram.com', + /** + * Are.na profile URL + */ + arena: 'https://are.na', +} as const; diff --git a/src/shared/lib/index.ts b/src/shared/lib/index.ts index 3342b79..1402578 100644 --- a/src/shared/lib/index.ts +++ b/src/shared/lib/index.ts @@ -1,5 +1,6 @@ export type { ClassValue } from 'clsx'; export { cn } from './cn'; +export { CONTACT_LINKS } from './config'; export * from './fonts'; export * from './formatDate'; export { groupByKey } from './groupByKey'; diff --git a/src/widgets/Navigation/ui/SidebarNav.tsx b/src/widgets/Navigation/ui/SidebarNav.tsx index 4eea38b..f11158e 100644 --- a/src/widgets/Navigation/ui/SidebarNav.tsx +++ b/src/widgets/Navigation/ui/SidebarNav.tsx @@ -1,7 +1,7 @@ 'use client'; import { useEffect, useState } from 'react'; -import { cn } from '$shared/lib'; +import { CONTACT_LINKS, cn } from '$shared/lib'; import type { NavItem } from '../model/types'; interface Props { @@ -85,16 +85,16 @@ export function SidebarNav({ items }: Props) {

Quick Links

- + Email - + LinkedIn - + Instagram - + Are.na
diff --git a/src/widgets/Navigation/ui/UtilityBar.tsx b/src/widgets/Navigation/ui/UtilityBar.tsx index 04de163..2693205 100644 --- a/src/widgets/Navigation/ui/UtilityBar.tsx +++ b/src/widgets/Navigation/ui/UtilityBar.tsx @@ -1,5 +1,6 @@ 'use client'; +import { CONTACT_LINKS } from '$shared/lib'; import { Button } from '$shared/ui'; /** @@ -18,8 +19,8 @@ export function UtilityBar() {
Contact - - hello@allmy.work + + {CONTACT_LINKS.email}