From 01e312bba7592ab84b8db5cbb78a533abe2266b1 Mon Sep 17 00:00:00 2001 From: David Dal Busco Date: Thu, 9 Nov 2023 11:28:37 +0100 Subject: [PATCH] docs: user junobuild/core-peer for next (#65) Signed-off-by: David Dal Busco --- docs/guides/astro.md | 3 ++- docs/guides/nextjs.md | 10 +++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/guides/astro.md b/docs/guides/astro.md index e1a6b13f..1e0e899e 100644 --- a/docs/guides/astro.md +++ b/docs/guides/astro.md @@ -64,11 +64,12 @@ Add an `insert` function to persist a document. import { initJuno, setDoc } from "@junobuild/core"; // Initialize Juno + // TODO: Replace 'satelliteId' with your actual satellite ID document.addEventListener( "DOMContentLoaded", async () => { await initJuno({ - satelliteId: "nkzsw-gyaaa-aaaal-ada3a-cai", + satelliteId: "aaaaa-bbbbb-ccccc-ddddd-cai", }); }, { once: true } diff --git a/docs/guides/nextjs.md b/docs/guides/nextjs.md index 66bb97a6..ebbc33bc 100644 --- a/docs/guides/nextjs.md +++ b/docs/guides/nextjs.md @@ -39,12 +39,12 @@ npx create-next-app@latest myjunoapp ### 3. Install the Juno SDK core library -Use `@junobuild/core` client library which provides a convenient interface for working with Juno from a Next.js app. +Use `@junobuild/core-peer` client library which provides a convenient interface for working with Juno from a Next.js app. -Navigate to the Next.js app and install `@junobuild/core`. +Navigate to the Next.js app and install `@junobuild/core-peer`. ```bash -cd myjunoapp && npm i @junobuild/core +cd myjunoapp && npm i @junobuild/core-peer ``` ### 4. Insert data from your app @@ -57,7 +57,7 @@ Add an `insert` function to persist a document. "use client"; import { useEffect, useState } from "react"; -import { type Doc, initJuno, setDoc } from "@junobuild/core"; +import { type Doc, initJuno, setDoc } from "@junobuild/core-peer"; type Record = { hello: string; @@ -70,7 +70,7 @@ export default function Home() { useEffect(() => { (async () => await initJuno({ - satelliteId: "wjar4-kiaaa-aaaal-ab4va-cai", + satelliteId: "aaaaa-bbbbb-ccccc-ddddd-cai", }))(); }, []);