-
Notifications
You must be signed in to change notification settings - Fork 2
Feat : seo, add blog, admin manager #64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
remcostoeten
wants to merge
6
commits into
master
Choose a base branch
from
claude/fix-activity-responsive-ghTq5
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
b9efa9f
fix: make activity feed responsive on mobile
claude 42953b3
fix: resolve dynamic server error in admin routes, update next-mdx-re…
claude e9396a3
feat: introduce a comprehensive admin dashboard for managing projects…
remcostoeten a902466
Harden release: secure dev auth flows and fix SEO routes
remcostoeten bc5f9eb
feat: Add core components for personal website, including hero, work …
remcostoeten ee91690
Merge branch 'master' into claude/fix-activity-responsive-ghTq5
remcostoeten File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -40,3 +40,5 @@ setup-posthog.md | |
|
|
||
| .env.production | ||
| env.production | ||
| .lh-tmp/* | ||
|
|
||
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,36 +1,7 @@ | ||
| 'use server' | ||
|
|
||
| import { auth } from '@/server/auth' | ||
| import { env } from '@/server/env' | ||
| import { cookies } from 'next/headers' | ||
|
|
||
| const ADMIN_EMAIL = env.ADMIN_EMAIL | ||
| import { isAdmin } from '@/utils/is-admin' | ||
|
|
||
| export async function checkAdminStatus(): Promise<boolean> { | ||
| try { | ||
| const cookieStore = await cookies() | ||
| const cookieHeader = cookieStore | ||
| .getAll() | ||
| .map(cookie => `${cookie.name}=${cookie.value}`) | ||
| .join('; ') | ||
|
|
||
| const session = await auth.api.getSession({ | ||
| headers: { | ||
| cookie: cookieHeader | ||
| } | ||
| }) | ||
|
|
||
| if (!session?.user) { | ||
| return false | ||
| } | ||
|
|
||
| const isEmailMatch = | ||
| session.user.email?.toLowerCase() === ADMIN_EMAIL?.toLowerCase() | ||
| const isRoleAdmin = session.user.role === 'admin' | ||
|
|
||
| return isRoleAdmin || isEmailMatch | ||
| } catch (error) { | ||
| console.error('[checkAdminStatus] Error:', error) | ||
| return false | ||
| } | ||
| return isAdmin() | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 67 additions & 0 deletions
67
src/app/(marketing)/blog/posts/drafts/stop-using-arrow-fnc-and-HUGE-REVEAL.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| --- | ||
| title: 'STOP USING ARROW FUNCTIONS' | ||
| publishedAt: '11-02-2026' | ||
| updatedAt: '11-02-2026' | ||
| summary: 'Arrow functions are convenient. That does not make them good architecture.' | ||
| tags: ['JavaScript', 'Engineering', 'Yappin'] | ||
| author: 'Remco Stoeten' | ||
| canonicalUrl: 'https://remcostoeten.nl/blog/stop-using-arrow-functions' | ||
| slug: 'stop-using-arrow-functions' | ||
| draft: true | ||
| --- | ||
|
|
||
| Arrow functions are convenient. | ||
|
|
||
| That’s it. That’s the whole pitch. | ||
|
|
||
| They aren’t hoisted. | ||
| They don’t have stable names. | ||
| They can’t be overloaded. | ||
| They don’t participate in prototypes. | ||
| They replace immutable symbols with mutable variables. | ||
|
|
||
| Yet somehow they became the default. | ||
|
|
||
| And then I see this: | ||
|
|
||
| ```js | ||
| export const Foo = () => { | ||
| return <Bar /> | ||
| } | ||
| ``` | ||
|
|
||
| Why. | ||
|
|
||
| Compare: | ||
|
|
||
| ```js | ||
| function Foo() { | ||
| return <Bar /> | ||
| } | ||
|
|
||
| const Foo = () => { | ||
| return <Bar /> | ||
| } | ||
| ``` | ||
|
|
||
| Same JSX. | ||
|
|
||
| Different semantics. | ||
|
|
||
| The first is a hoisted, named function declaration. | ||
|
|
||
| The second is a variable holding an anonymous closure. | ||
|
|
||
| “But arrows bind `this` automatically.” | ||
|
|
||
| Exactly. Hidden behavior. | ||
|
|
||
| Great for callbacks. | ||
|
|
||
| Bad for architecture. | ||
|
|
||
| Arrow functions optimize for keystrokes. | ||
|
|
||
| Function declarations optimize for systems. | ||
|
|
||
| If your codebase is bigger than a toy project, stop pretending they’re interchangeable. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| import { ReactNode } from 'react' | ||
| import { notFound } from 'next/navigation' | ||
| import { canAccessDevTools } from '@/lib/dev-access' | ||
|
|
||
| export const dynamic = 'force-dynamic' | ||
|
|
||
| export default async function DevLayout({ children }: { children: ReactNode }) { | ||
| const canAccess = await canAccessDevTools() | ||
|
|
||
| if (!canAccess) { | ||
| notFound() | ||
| } | ||
|
|
||
| return children | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: remcostoeten/remcostoeten.nl
Length of output: 1624
🏁 Script executed:
Repository: remcostoeten/remcostoeten.nl
Length of output: 824
🏁 Script executed:
Repository: remcostoeten/remcostoeten.nl
Length of output: 99
🏁 Script executed:
Repository: remcostoeten/remcostoeten.nl
Length of output: 2411
🏁 Script executed:
Repository: remcostoeten/remcostoeten.nl
Length of output: 473
🏁 Script executed:
Repository: remcostoeten/remcostoeten.nl
Length of output: 864
🏁 Script executed:
Repository: remcostoeten/remcostoeten.nl
Length of output: 54
Change date format to
YYYY-MM-DDto match other blog posts and enable proper parsing.The date
'11-02-2026'doesn't follow the ISO 8601 format (YYYY-MM-DD) used consistently throughout other blog posts (e.g.,'2025-12-31','2024-12-30'). TheformatDate()function insrc/utils/utils.tsrelies on JavaScript's Date constructor, which expects ISO 8601 format and will misparsé or fail on'11-02-2026T00:00:00'. Change to'2026-02-11'(or'2026-11-02'if intended for November).🤖 Prompt for AI Agents