Skip to content

Comments

feat: nextjs starter#1

Merged
eldadfux merged 6 commits intoappwrite:devfrom
loks0n:feat-nextjs-stater
Feb 14, 2025
Merged

feat: nextjs starter#1
eldadfux merged 6 commits intoappwrite:devfrom
loks0n:feat-nextjs-stater

Conversation

@loks0n
Copy link
Member

@loks0n loks0n commented Oct 14, 2024

What does this PR do?

(Provide a description of what this PR does.)

Test Plan

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work.)

Related PRs and Issues

(If this PR is related to any other PR or resolves any issue or related to any issue link all related PR and issues here.)

Have you read the Contributing Guidelines on issues?

(Write your answer here.)

Copy link
Contributor

@ernstmul ernstmul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we change the starter to Typescript?

Comment on lines 70 to 85
<svg
width="72"
height="72"
viewBox="0 0 32 32"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M27.1611 4.23322C24.3168 -0.0234282 18.6541 -1.2706 14.5833 1.41353L7.4071 6.18531C5.44997 7.45959 4.09302 9.54725 3.70159 11.906C3.36235 13.8852 3.6494 15.9187 4.56273 17.681C3.93645 18.657 3.51892 19.7415 3.33626 20.8802C2.91873 23.2932 3.46673 25.7876 4.82368 27.7668C7.69415 32.0234 13.3307 33.2706 17.4016 30.5865L24.5777 25.8418C26.5349 24.5675 27.8918 22.4799 28.2832 20.1211C28.6225 18.1419 28.3354 16.1084 27.4221 14.3461C28.0484 13.3701 28.4659 12.2856 28.6486 11.1469C29.0922 8.70676 28.5442 6.21242 27.1611 4.23322Z"
fill="#FF3E00"
/>
<path
d="M13.797 28.6159C11.3759 29.2212 8.84601 28.3001 7.43146 26.3264C6.56096 25.1684 6.23453 23.721 6.47935 22.3C6.53376 22.0631 6.58817 21.8526 6.64257 21.6157L6.77859 21.1947L7.15943 21.4578C8.05713 22.0894 9.03643 22.5631 10.0973 22.8789L10.3694 22.9579L10.3422 23.221C10.315 23.5895 10.4238 23.9842 10.6414 24.3C11.0767 24.9053 11.8383 25.1948 12.5728 25.0105C12.736 24.9579 12.8993 24.9053 13.0353 24.8263L20.4889 20.2209C20.8697 19.9841 21.1145 19.642 21.1962 19.2209C21.2778 18.7999 21.169 18.3525 20.9241 18.0104C20.4889 17.4051 19.7272 17.1419 18.9927 17.3261C18.8295 17.3788 18.6663 17.4314 18.5303 17.5104L15.674 19.2736C15.2115 19.563 14.6946 19.7736 14.1506 19.9052C11.7295 20.5104 9.19965 19.5894 7.7851 17.6156C6.9418 16.4577 6.58817 15.0103 6.8602 13.5892C7.10502 12.2207 7.97552 10.9839 9.19965 10.247L16.6805 5.64161C17.1429 5.35213 17.6598 5.1416 18.2038 4.9837C20.6249 4.37842 23.1548 5.2995 24.5693 7.27323C25.4398 8.43116 25.7663 9.87856 25.5214 11.2997C25.467 11.5365 25.4126 11.747 25.331 11.9839L25.195 12.4049L24.8142 12.1418C23.9165 11.5102 22.9371 11.0365 21.8762 10.7207L21.6042 10.6417L21.6314 10.3786C21.6586 10.0101 21.5498 9.6154 21.3322 9.2996C20.8969 8.69432 20.1352 8.43116 19.4008 8.61537C19.2375 8.66801 19.0743 8.72064 18.9383 8.79959L11.4847 13.405C11.1039 13.6418 10.859 13.9839 10.7774 14.405C10.6958 14.8261 10.8046 15.2734 11.0495 15.6156C11.4847 16.2208 12.2464 16.484 12.9809 16.2998C13.1441 16.2472 13.3073 16.1945 13.4433 16.1156L16.2996 14.3524C16.7621 14.0629 17.2789 13.8524 17.823 13.6945C20.2441 13.0892 22.7739 14.0103 24.1885 15.984C25.059 17.1419 25.3854 18.5893 25.1406 20.0104C24.8958 21.3789 24.0253 22.6157 22.8011 23.3526L15.3203 27.958C14.8579 28.2475 14.341 28.458 13.797 28.6159Z"
fill="white"
/>
</svg>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the Svelte logo. Should update for the Next.js logo?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

if (status === "loading") return;
setStatus("loading");
try {
const result = await client.ping();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By the looks of it, ping() does not exist on client?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a new endpoint we're adding

src/app/page.js Outdated
className="u-flex-vertical u-gap-8"
>
<div className="u-flex u-main-space-between u-cross-center">
<h2 className="heading-level-7">Go to console</h2>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<h2 className="heading-level-7">Go to console</h2>
<h2 className="heading-level-7">Head to Appwrite Cloud</h2>

@adityaoberai
Copy link
Member

image

@loks0n this error is coming up

src/app/page.js Outdated
import "./app.css";
import "@appwrite.io/pink";
import "@appwrite.io/pink-icons";
import { useState, useEffect, useRef } from "react";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import { useState, useEffect, useRef } from "react";
import { useState, useEffect, useRef, useCallback } from "react";

useCallback is being used later but has not been defined

@@ -0,0 +1,10 @@
import { Client, Account, Databases, Health } from "node-appwrite";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to use the web SDK or the Node SDK

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it's Node, we haven't added the package to our package.json

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll use the Web SDK for now I think, maybe later we could do SSR

@loks0n loks0n requested a review from adityaoberai October 21, 2024 14:03
@eldadfux eldadfux changed the base branch from main to dev February 14, 2025 20:13
@eldadfux eldadfux merged commit 14679a5 into appwrite:dev Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants