Skip to content

Commit

Permalink
Update references to package name
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevintjuhz committed Oct 16, 2024
1 parent 913b119 commit 4c45c18
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ easier personalization & A/B testing implementation in your NextJS project.
To install the Prepr NextJS package, run the following command:

```bash
npm install @prepr/prepr-nextjs
npm install @prepr/@preprio/prepr-nextjs
```

Next you should navigate to your .env file and add the following environment variables:
Expand All @@ -28,7 +28,7 @@ file. If you don't have this file, you can create it in the root of your project
Then add the following code to the `middleware.js|middleware.ts` file:
```javascript
import type { NextRequest } from 'next/server'
import { PreprMiddleware } from 'prepr-nextjs'
import { PreprMiddleware } from '@preprio/prepr-nextjs'

export function middleware(request: NextRequest) {
return PreprMiddleware(request)
Expand All @@ -51,7 +51,7 @@ To setup the headers with your API calls, you can call the `getPreprHeaders()` h
```javascript
import { getClient } from '@/lib/client'
import { GetPageBySlugDocument, GetPageBySlugQuery } from '@/gql/graphql'
import { getPreprHeaders } from 'prepr-nextjs'
import { getPreprHeaders } from '@preprio/prepr-nextjs'

const getData = async () => {
// Fetching the data using Apollo Client
Expand Down Expand Up @@ -85,11 +85,11 @@ Then add the following code to the `layout.tsx` file:

```javascript
// Helper function to get all the props for the PreviewBar component (this needs a server component)
import { getPreviewBarProps } from 'prepr-nextjs'
import { getPreviewBarProps } from '@preprio/prepr-nextjs'
// Import the PreviewBar component
import { PreprPreviewBar } from 'prepr-nextjs/components'
import { PreprPreviewBar } from '@preprio/prepr-nextjs/components'
// Import the PreviewBar CSS
import 'prepr-nextjs/dist/components.css'
import '@preprio/prepr-nextjs/dist/components.css'


export default async function RootLayout({children}: {children: React.ReactNode}) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@preprio/prepr-nextjs",
"version": "1.0.0-beta.2",
"version": "1.0.0-beta.3",
"description": "A next.js package with code snippets to use with Prepr",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand Down

0 comments on commit 4c45c18

Please sign in to comment.