Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 11cd8f7

Browse files
committed
refactor: make the creator a single point of truth
1 parent e4bcc4b commit 11cd8f7

File tree

12 files changed

+39
-17
lines changed

12 files changed

+39
-17
lines changed

src/app/(pages)/about/page.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import About from '@/app/(pages)/about/_about';
2+
import { CREATOR } from '@/lib/constants';
23
import { pub } from '@/lib/env';
34
import { getSiteName } from '@/lib/funcs/site-name';
45
import type { Metadata } from 'next';
56

67
const PAGE_URL = new URL(pub.SITE_URL_PROD + '/about');
7-
const creator = 'Ashref Gwader';
88
const title = 'About';
99
const description = "I'm a software developer and technical educator";
10-
const kw: string[] = [creator, 'ashgw', 'about'];
10+
const kw: string[] = [CREATOR, 'ashgw', 'about'];
1111

1212
const postImageWidth = 1200; // in pixels
1313
const postImageHeight = 630;
@@ -19,7 +19,7 @@ export const metadata: Metadata = {
1919
default: title,
2020
template: '%s | Ashgw',
2121
},
22-
creator: creator,
22+
creator: CREATOR,
2323
keywords: kw,
2424
description: description,
2525
openGraph: {

src/app/(pages)/blog/[post]/page.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import Footer from '@/app/components/footer/footer';
22
import PostSection from '@/app/components/post/post-section';
33
import LoadingScreen from '@/app/components/reusables/loading-screen';
4+
import { CREATOR } from '@/lib/constants';
45
import { pub } from '@/lib/env';
56
import { getSiteName } from '@/lib/funcs/site-name';
67
import { getBlogPost, getBlogPosts } from '@/lib/mdx/content';
@@ -63,7 +64,7 @@ export async function generateMetadata({
6364
description: seoDescription,
6465
images: [postImageUrl],
6566
},
66-
creator: 'Ashref Gwader',
67+
creator: CREATOR,
6768
keywords: postAttrs.tags,
6869
robots: {
6970
index: false,

src/app/(pages)/blog/loading.tsx

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/app/(pages)/blog/page.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import Posts from '@/app/components/post/posts';
22
import LoadingScreen from '@/app/components/reusables/loading-screen';
3+
import { CREATOR } from '@/lib/constants';
34
import { pub } from '@/lib/env';
45
import { getSiteName } from '@/lib/funcs/site-name';
56
import { getBlogPosts } from '@/lib/mdx/content';
@@ -8,10 +9,9 @@ import { notFound } from 'next/navigation';
89
import { Suspense } from 'react';
910

1011
const PAGE_URL = new URL(pub.SITE_URL_PROD + '/blog');
11-
const creator = 'Ashref Gwader';
1212
const title = 'Blog';
1313
const description = 'All about tech';
14-
const kw: string[] = [creator, 'ashgw', 'blog'];
14+
const kw: string[] = [CREATOR, 'ashgw', 'blog'];
1515

1616
const postImageWidth = 1200; // in pixels
1717
const postImageHeight = 630;
@@ -23,7 +23,7 @@ export const metadata: Metadata = {
2323
default: title,
2424
template: '%s | Ashgw',
2525
},
26-
creator: creator,
26+
creator: CREATOR,
2727
keywords: kw,
2828
description: description,
2929
openGraph: {

src/app/(pages)/contact/page.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import Contact from '@/app/(pages)/contact/_contact';
2+
import { CREATOR } from '@/lib/constants';
23
import { pub } from '@/lib/env';
34
import { getSiteName } from '@/lib/funcs/site-name';
45
import type { Metadata } from 'next';
56

67
const PAGE_URL = new URL(pub.SITE_URL_PROD + '/contact');
7-
const creator = 'Ashref Gwader';
88
const title = 'Contact';
99
const description = 'Feel free to reach out';
10-
const kw: string[] = [creator, 'ashgw', 'contact'];
10+
const kw: string[] = [CREATOR, 'ashgw', 'contact'];
1111

1212
const postImageWidth = 1200; // in pixels
1313
const postImageHeight = 630;
@@ -19,7 +19,7 @@ export const metadata: Metadata = {
1919
default: title,
2020
template: '%s | Ashgw',
2121
},
22-
creator: creator,
22+
creator: CREATOR,
2323
keywords: kw,
2424
description: description,
2525
openGraph: {

src/app/(pages)/services/[post]/page.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import Footer from '@/app/components/footer/footer';
22
import PostSection from '@/app/components/post/post-section';
33
import LoadingScreen from '@/app/components/reusables/loading-screen';
4+
import { CREATOR } from '@/lib/constants';
45
import { pub } from '@/lib/env';
56
import { getSiteName } from '@/lib/funcs/site-name';
67
import { getBusinessPost, getBusinessPosts } from '@/lib/mdx/content';
@@ -63,7 +64,7 @@ export async function generateMetadata({
6364
description,
6465
images: [postImageUrl],
6566
},
66-
creator: 'Ashref Gwader',
67+
creator: CREATOR,
6768
keywords: postAttrs.tags,
6869
robots: {
6970
index: false,

src/app/(pages)/services/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import Services from '@/app/(pages)/services/_services';
2+
import { CREATOR } from '@/lib/constants';
23
import { pub } from '@/lib/env';
34
import { getSiteName } from '@/lib/funcs/site-name';
45
import type { Metadata } from 'next';
56

67
const SERVICES_URL = new URL(pub.SITE_URL_PROD + '/services');
7-
const CREATOR = 'Ashref Gwader';
88
const title = 'Services';
99
const description = 'Software Consulting. Custom Solutions.';
1010
const url = SERVICES_URL;

src/app/components/footer/copyright.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
'use client';
22

3+
import { CREATOR } from '@/lib/constants';
34
import { motion } from 'framer-motion';
45
import Link from 'next/link';
56

@@ -19,7 +20,7 @@ export default function CopyRight() {
1920
}}
2021
>
2122
<p className="flex items-center justify-center text-secondary-center dimmed-3 text-sm">
22-
&copy; {new Date().getFullYear()} Ashref Gwader. All rights reserved
23+
&copy; {new Date().getFullYear()} {CREATOR}. All rights reserved
2324
</p>
2425
<div className="hidden dimmed-3 flex items-center justify-center gap-2 max-w-md mx-auto sm:gap-4">
2526
<Link

src/app/components/nav/nav.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export function LeftNav() {
8888
export function RightNav() {
8989
return (
9090
<div className="absolute inset-y-0 right-0 flex items-center pr-2 sm:static sm:inset-auto sm:ml-6 sm:pr-0 gap-3">
91-
<div className="hidden average-transition hover:average-translate">
91+
<div className="average-transition hover:average-translate">
9292
<SourceCodeButton href={REPO_SOURCE} />
9393
</div>
9494
<div className=" glowsup hidden sm:block">

src/app/components/protos/hero-section.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -419,6 +419,12 @@ import { Button } from '../ui/button';
419419

420420
/* eslint-disable */
421421

422+
/* eslint-disable */
423+
424+
/* eslint-disable */
425+
426+
/* eslint-disable */
427+
422428
function TypingAnimation() {
423429
const el = useRef(null);
424430

0 commit comments

Comments
 (0)