Skip to content

Commit a97b76c

Browse files
committed
2 parents 098df79 + 72570c8 commit a97b76c

File tree

3 files changed

+29
-18
lines changed

3 files changed

+29
-18
lines changed

CONTRIBUTING.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,18 +38,23 @@ To use GitHub authentication in the project, you need to create a GitHub OAuth a
3838

3939
Xata is used as the database for this project. Follow these steps to set it up:
4040

41-
1. Sign up for a Xata account at https://xata.io/
42-
2. Install the Xata CLI globally:
41+
1. Sign up for a Xata account at https://lite.xata.io/
42+
2. Create a new workspace and database from Xata dashboard
43+
3. Install the Xata CLI globally:
4344
```sh
4445
npm install -g "@xata.io/cli@latest"
4546
```
46-
3. Authenticate with Xata:
47+
4. Authenticate with Xata:
4748
```sh
4849
xata auth login
4950
```
50-
4. Run the migration:
51+
5. Initialize the database:
5152
```sh
52-
xata push main
53+
xata init
54+
```
55+
5. Upload the database schema:
56+
```sh
57+
xata schema upload db-schema.json
5358
```
5459

5560
## Environment Variables

next.config.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ import './src/env.mjs';
33
/**@type {import('next').NextConfig}*/
44
const config = {
55
reactStrictMode: true,
6+
experimental: {
7+
viewTransition: true
8+
},
69
async redirects() {
710
return [
811
{

src/app/layout.tsx

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import '@/styles/globals.css';
22
import Script from 'next/script';
33
import type { Metadata, Viewport } from 'next';
44
import { Space_Grotesk } from 'next/font/google';
5+
import { unstable_ViewTransition as ViewTransition } from 'react';
56
import { Toaster } from 'react-hot-toast';
67
import { SessionProvider } from 'next-auth/react';
78
import { Footer } from '@/components/footer';
@@ -19,19 +20,21 @@ export default function RootLayout({ children }: React.PropsWithChildren) {
1920
return (
2021
<html className={spaceGrotesk.variable}>
2122
<body className="font-sans font-normal bg-hacktoberfest-blue">
22-
{children}
23-
<Footer />
24-
<SessionProvider>
25-
<ReportModal />
26-
</SessionProvider>
27-
<Toaster position="bottom-right" />
28-
{env.NEXT_PUBLIC_ANALYTICS_WEBSITE_ID && (
29-
<Script
30-
src="https://cloud.umami.is/script.js"
31-
data-website-id={env.NEXT_PUBLIC_ANALYTICS_WEBSITE_ID}
32-
strategy="lazyOnload"
33-
/>
34-
)}
23+
<ViewTransition>
24+
{children}
25+
<Footer />
26+
<SessionProvider>
27+
<ReportModal />
28+
</SessionProvider>
29+
<Toaster position="bottom-right" />
30+
{env.NEXT_PUBLIC_ANALYTICS_WEBSITE_ID && (
31+
<Script
32+
src="https://cloud.umami.is/script.js"
33+
data-website-id={env.NEXT_PUBLIC_ANALYTICS_WEBSITE_ID}
34+
strategy="lazyOnload"
35+
/>
36+
)}
37+
</ViewTransition>
3538
</body>
3639
</html>
3740
);

0 commit comments

Comments
 (0)