-
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.
Parse connection, Parse data fetching & manipulation
- Loading branch information
Showing
7 changed files
with
201 additions
and
45 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import {createContext} from "react"; | ||
|
||
const ParseContext = createContext(); | ||
|
||
export default ParseContext; |
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,24 +1,31 @@ | ||
"use client"; | ||
|
||
import {Inter} from "next/font/google"; | ||
import "./globals.css"; | ||
import Header from "@/app/components/Header"; | ||
import Container from "@/app/components/Container"; | ||
import Parse from "parse/dist/parse"; | ||
import ParseContext from "@/app/context/parseContext"; | ||
|
||
const inter = Inter({ subsets: ["latin"] }); | ||
|
||
export const metadata = { | ||
title: "back4app-postgres", | ||
description: "Example on how to use PostgreSQL with Back4app.", | ||
}; | ||
Parse.initialize( | ||
process.env.NEXT_PUBLIC_PARSE_APPLICATION_ID, | ||
process.env.NEXT_PUBLIC_PARSE_JAVASCRIPT_KEY, | ||
); | ||
Parse.serverURL = "https://parseapi.back4app.com/"; | ||
|
||
export default function RootLayout({ children }) { | ||
return ( | ||
<html lang="en"> | ||
<body className={inter.className}> | ||
<Header/> | ||
<Container> | ||
{children} | ||
</Container> | ||
</body> | ||
</html> | ||
<ParseContext.Provider value={Parse}> | ||
<html lang="en"> | ||
<body className={inter.className}> | ||
<Header/> | ||
<Container> | ||
{children} | ||
</Container> | ||
</body> | ||
</html> | ||
</ParseContext.Provider> | ||
); | ||
} |
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