-
-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
♻️ Full front+backend migration from page router to app router.
Followed nextjs official docs and best practices, backed by Playwright behavior regression test passing. Upated unit tests to reflect the new framework.
- Loading branch information
Showing
20 changed files
with
494 additions
and
316 deletions.
There are no files selected for viewing
This file contains 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,9 @@ | ||
'use client' | ||
|
||
import { JSX } from 'react' | ||
|
||
import MainRenderer from '@/src/components/mainRenderer' | ||
|
||
export default function PreviewConfigPage(): JSX.Element { | ||
return <MainRenderer /> | ||
} |
File renamed without changes.
This file contains 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,64 @@ | ||
import { GoogleTagManager } from '@next/third-parties/google' | ||
import type { Metadata, Viewport } from 'next' | ||
import { Inter } from 'next/font/google' | ||
import { JSX, type ReactNode } from 'react' | ||
import { Toaster } from 'react-hot-toast' | ||
|
||
import './globals.css' | ||
import { version } from '@/common/helpers' | ||
import Footer from '@/src/components/footer/footer' | ||
import Header from '@/src/components/header/header' | ||
|
||
const inter = Inter({ | ||
subsets: ['latin'], | ||
}) | ||
|
||
export const metadata: Metadata = { | ||
title: 'GitHub Socialify', | ||
description: '💞 Socialify your project. 🌐 Share with the world!', | ||
manifest: '/manifest.json', | ||
openGraph: { | ||
images: [ | ||
{ | ||
url: 'https://socialify.git.ci/wei/socialify/png?description=1&font=Raleway&issues=1&language=1&pattern=Charlie%20Brown&pulls=1&stargazers=1&theme=Light', | ||
width: 1280, | ||
height: 640, | ||
type: 'image/png', | ||
}, | ||
], | ||
}, | ||
} | ||
|
||
export const viewport: Viewport = { | ||
themeColor: '#000000', | ||
width: 'device-width', | ||
// The following settings breaks mobile view, use with caution. | ||
// initialScale: 1, | ||
// maximumScale: 1, | ||
// userScalable: false, | ||
} | ||
|
||
export default function RootLayout({ | ||
children, | ||
}: Readonly<{ children: ReactNode }>): JSX.Element { | ||
return ( | ||
<html lang="en"> | ||
<head> | ||
<meta name="viewport" content="minimal-ui" /> | ||
<meta property="x-socialify-version" content={version} /> | ||
<link rel="shortcut icon" href="/favicon.ico" /> | ||
<link rel="apple-touch-icon" href="/assets/logo192.png" /> | ||
</head> | ||
<body | ||
className={`${inter.className} flex flex-col min-h-screen socialify-bg`} | ||
> | ||
<Header /> | ||
<main className="flex-1 flex">{children}</main> | ||
<Footer /> | ||
<Toaster /> | ||
</body> | ||
{/* Google Tag Manager, env only relevant/accessible to owner, use '' for dev. */} | ||
<GoogleTagManager gtmId={process.env.GTM_ID || ''} /> | ||
</html> | ||
) | ||
} |
This file contains 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 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,9 @@ | ||
'use client' | ||
|
||
import { JSX } from 'react' | ||
|
||
import Repo from '@/src/components/repo/repo' | ||
|
||
export default function HomePage(): JSX.Element { | ||
return <Repo /> | ||
} |
This file contains 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,6 +1,5 @@ | ||
/// <reference types="next" /> | ||
/// <reference types="next/image-types/global" /> | ||
/// <reference types="next/navigation-types/compat/navigation" /> | ||
|
||
// NOTE: This file should not be edited | ||
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information. |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.