-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ Changed fonts and fixed issues with missing dependencies as well as…
… legacy next.js elements
- Loading branch information
Showing
23 changed files
with
1,696 additions
and
88 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,3 @@ | ||
{ | ||
"extends": "next/core-web-vitals" | ||
} |
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
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
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
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
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 |
---|---|---|
@@ -1,15 +1,21 @@ | ||
import type { NextApiRequest, NextApiResponse } from "next"; | ||
import { connectToDatabase } from '../../lib/mongodb-old' | ||
import { connectToDatabase } from "../../lib/mongodb-old"; | ||
import { getSession } from "next-auth/react"; | ||
|
||
export default async (req: NextApiRequest, res: NextApiResponse) => { | ||
const { db } = await connectToDatabase() | ||
const handler = async (req: NextApiRequest, res: NextApiResponse) => { | ||
const { db } = await connectToDatabase(); | ||
const session = await getSession({ req }); | ||
|
||
if (session && session.user) { | ||
const posts = await db.collection('posts').find({ author: session.user.email }).sort({'_id': -1}).toArray() | ||
const posts = await db | ||
.collection("posts") | ||
.find({ author: session.user.email }) | ||
.sort({ _id: -1 }) | ||
.toArray(); | ||
res.send(posts); | ||
} else { | ||
res.send({ message: 'Not logged in' }) | ||
res.send({ message: "Not logged in" }); | ||
} | ||
}; | ||
|
||
export default handler; |
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 |
---|---|---|
@@ -1,15 +1,21 @@ | ||
import type { NextApiRequest, NextApiResponse } from "next"; | ||
import { connectToDatabase } from '../../lib/mongodb-old' | ||
import { connectToDatabase } from "../../lib/mongodb-old"; | ||
import { getSession } from "next-auth/react"; | ||
|
||
export default async (req: NextApiRequest, res: NextApiResponse) => { | ||
const { db } = await connectToDatabase() | ||
const handler = async (req: NextApiRequest, res: NextApiResponse) => { | ||
const { db } = await connectToDatabase(); | ||
const session = await getSession({ req }); | ||
|
||
if (session && session.user) { | ||
const posts = await db.collection('posts').find({ }).sort({'_id': -1}).toArray() | ||
const posts = await db | ||
.collection("posts") | ||
.find({}) | ||
.sort({ _id: -1 }) | ||
.toArray(); | ||
res.send(posts); | ||
} else { | ||
res.send({ message: 'Not logged in' }) | ||
res.send({ message: "Not logged in" }); | ||
} | ||
}; | ||
|
||
export default handler; |
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
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
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
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
Oops, something went wrong.
f248ce1
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.
Successfully deployed to the following URLs:
crystal – ./
crystal-dnrm.vercel.app
crystal-git-main-dnrm.vercel.app
crystal.medina.dev