diff --git a/TODO.md b/TODO.md deleted file mode 100644 index 31bc10ca..00000000 --- a/TODO.md +++ /dev/null @@ -1,48 +0,0 @@ -### Warning and errors on prod http://academy.developerdao.com - -March 2024 - -- image Error while trying to use the following icon from the - Manifest: http://localhost:3000/icon-192x192.png (Download error or resource isn't a valid image) - -- fix render method of `SlotClone`. on hamburger_menu svg icon code. We have to use React.forwardRef as explained here: https://www.radix-ui.com/primitives/docs/guides/composition#your-component-must-forward-ref - -- check a future error with cookies on: https://developers.google.com/privacy-sandbox/3pcd?hl=es-419#report-issues - -- vercel analytics error present in development environment. check error msg: [Vercel Web Analytics] Failed to load script from /\_vercel/insights/script.js. Be sure to enable Web Analytics for your project and deploy again. See https://vercel.com/docs/analytics/quickstart for more information. - -- Image with src "http://localhost:3000/academy_logo.svg" has either width or height modified, but not the other. If you use CSS to change the size of your image, also include the styles 'width: "auto"' or 'height: "auto"' to maintain the aspect ratio. - -- Image with src "http://localhost:3000/dd_logo.svg" has either width or height modified, but not the other. If you use CSS to change the size of your image, also include the styles 'width: "auto"' or 'height: "auto"' to maintain the aspect ratio. - -- It would be good to use https://github.com/chrishoermann/zod-prisma-types to re-use the prisma types to create zod schemas to use in the react-hook-form implementation - ---- - -## Dev Notes - -#### TOPIC: Generate Zod schemas using Prisma types dynamically (for admin app forms) - -- Read: https://github.com/prisma/prisma/discussions/10928 - The following snippet is the example code from the link above about how to type relations - -```ts -const videoWithVotes = Prisma.validator()({ - include: { votes: true }, -}); -type VideosWithVotes = Prisma.VideoGetPayload; -``` - -#### npm packages: - -- https://www.npmjs.com/package/zod-prisma-types - -- https://www.npmjs.com/package/prisma-zod-generator - ---- - -track title -track description -track image -track tags -specify lessons in the track diff --git a/apps/academy/src/components/mdx/QuizCompletedModals.tsx b/apps/academy/src/components/mdx/QuizCompletedModals.tsx index 5a10164b..eeb3761a 100644 --- a/apps/academy/src/components/mdx/QuizCompletedModals.tsx +++ b/apps/academy/src/components/mdx/QuizCompletedModals.tsx @@ -20,10 +20,11 @@ export interface QuizProps { nextLessonTitle: string; actualLessonTitle: string; quizCompleted: boolean; - successMessage?: { message: string }[]; + successMessage?: { message: string }[] | undefined; successTitle?: string | undefined; currentLessonPath: string; - actionButton?: { href: string; text: string } | null; + actionButton?: { href: string; text: string } | null | undefined; + partnerTwitterHandle?: string | undefined; } export type Answers = Record; @@ -38,9 +39,9 @@ const QuizCompletedModals = ({ "You answered all the quiz questions correctly, great job. Celebrate your learning on Twitter and advance to the next lesson below.", }, ], - // successTitle = "Lesson complete", currentLessonPath, actionButton, + partnerTwitterHandle, }: QuizProps): JSX.Element => { const [showDialog, setShowDialog] = useState(false); // const [showKeepGoingModal, setShowKeepGoingModal] = useState(false); @@ -114,8 +115,9 @@ const QuizCompletedModals = ({
diff --git a/apps/academy/src/components/mdx/QuizStatusChecker.tsx b/apps/academy/src/components/mdx/QuizStatusChecker.tsx index 2ce202d8..a0419a03 100644 --- a/apps/academy/src/components/mdx/QuizStatusChecker.tsx +++ b/apps/academy/src/components/mdx/QuizStatusChecker.tsx @@ -9,9 +9,10 @@ import Quiz from "./Quiz"; export interface QuizStatusCheckerType { quiz: string; - successMessage: { message: string }[]; + successMessage?: { message: string }[]; successTitle?: string; - actionButton: any; + actionButton?: { href: string; text: string } | null; + partnerTwitterHandle?: string | undefined; } const QuizStatusChecker = ({ @@ -19,6 +20,7 @@ const QuizStatusChecker = ({ successMessage, successTitle, actionButton, + partnerTwitterHandle, }: QuizStatusCheckerType) => { const [quizCompleted, setQuizCompleted] = useState(false); const { address, isDisconnected } = useAccount(); @@ -86,6 +88,7 @@ const QuizStatusChecker = ({ nextLessonTitle={nextLessonTitle} actualLessonTitle={actualLessonTitle} currentLessonPath={currentLessonPath} + partnerTwitterHandle={partnerTwitterHandle} /> {/* Quiz Completed diff --git a/apps/academy/src/pages/tracks/arweave-101/1.mdx b/apps/academy/src/pages/tracks/arweave-101/1.mdx index dbab6099..4d6502b4 100644 --- a/apps/academy/src/pages/tracks/arweave-101/1.mdx +++ b/apps/academy/src/pages/tracks/arweave-101/1.mdx @@ -243,6 +243,7 @@ Arweave’s bundled transactions allow you to move actions to L2 if you need mor message: "Secret code: HOLZBV", }, ]} + partnerTwitterHandle="@ar_io_network" /> ## Conclusion diff --git a/apps/academy/src/pages/tracks/arweave-101/2.mdx b/apps/academy/src/pages/tracks/arweave-101/2.mdx index fdc7432e..c18fbcfc 100644 --- a/apps/academy/src/pages/tracks/arweave-101/2.mdx +++ b/apps/academy/src/pages/tracks/arweave-101/2.mdx @@ -349,6 +349,7 @@ Gateway nodes' indexing and caching features make accessing data on Arweave stra message: "Secret code: CSSYVH", }, ]} + partnerTwitterHandle="@ar_io_network" /> ## Conclusion diff --git a/apps/academy/src/pages/tracks/arweave-101/3.mdx b/apps/academy/src/pages/tracks/arweave-101/3.mdx index 495e5ff3..2613393f 100644 --- a/apps/academy/src/pages/tracks/arweave-101/3.mdx +++ b/apps/academy/src/pages/tracks/arweave-101/3.mdx @@ -483,6 +483,7 @@ You also created your first wallet address and learned about the available Arwea message: "Secret code: DZBGSD", }, ]} + partnerTwitterHandle="@ar_io_network" /> ## Conclusion diff --git a/apps/academy/src/pages/tracks/arweave-101/4.mdx b/apps/academy/src/pages/tracks/arweave-101/4.mdx index 5827cfcd..09fbd7e1 100644 --- a/apps/academy/src/pages/tracks/arweave-101/4.mdx +++ b/apps/academy/src/pages/tracks/arweave-101/4.mdx @@ -542,6 +542,7 @@ as long as Arweave is online. message: "Secret code: 6QAIZ6", }, ]} + partnerTwitterHandle="@ar_io_network" /> ## Conclusion diff --git a/apps/academy/src/pages/tracks/arweave-101/5.mdx b/apps/academy/src/pages/tracks/arweave-101/5.mdx index d2b239d4..39815877 100644 --- a/apps/academy/src/pages/tracks/arweave-101/5.mdx +++ b/apps/academy/src/pages/tracks/arweave-101/5.mdx @@ -1012,6 +1012,7 @@ gateways and how to structure your code and split your bundle chunks to save mon message: "Secret code: HlUJAJ", }, ]} + partnerTwitterHandle="@ar_io_network" /> ## Conclusion diff --git a/apps/academy/src/pages/tracks/arweave-201/1.mdx b/apps/academy/src/pages/tracks/arweave-201/1.mdx index e0207d4a..76f96438 100644 --- a/apps/academy/src/pages/tracks/arweave-201/1.mdx +++ b/apps/academy/src/pages/tracks/arweave-201/1.mdx @@ -377,6 +377,7 @@ In this lesson you learned what an Arweave gateway is and how to run one on your message: "Secret code: BR9LX5", }, ]} + partnerTwitterHandle="@ar_io_network" /> ## Conclusion diff --git a/apps/academy/src/pages/tracks/arweave-201/2.mdx b/apps/academy/src/pages/tracks/arweave-201/2.mdx index abd25535..19f1b4f5 100644 --- a/apps/academy/src/pages/tracks/arweave-201/2.mdx +++ b/apps/academy/src/pages/tracks/arweave-201/2.mdx @@ -408,16 +408,17 @@ In this lesson, you learned how to deploy an Arweave gateway to AWS and everythi message: "Secret code: PO3ZEO", }, ]} + partnerTwitterHandle="@ar_io_network" /> ## Conclusion -Hosting an Arweave gateway in the cloud is much more involved than doing so on your machine. -You need to think about reliability, content caching, and security. -Running a gateway improves all users' access to data on Arweave. +Hosting an Arweave gateway in the cloud is much more involved than doing so on your machine. +You need to think about reliability, content caching, and security. +Running a gateway improves all users' access to data on Arweave. When the AR.IO network goes mainnet, you can join it and earn IO tokens for hosting a gateway. -You might already think it's not enough to just offer access to the data on Arweave. That's why +You might already think it's not enough to just offer access to the data on Arweave. That's why you'll learn how to add a bundler to your gateway that let's you handle your own uploads. diff --git a/apps/academy/src/pages/tracks/arweave-201/3.mdx b/apps/academy/src/pages/tracks/arweave-201/3.mdx index 2ee65582..b53bae99 100644 --- a/apps/academy/src/pages/tracks/arweave-201/3.mdx +++ b/apps/academy/src/pages/tracks/arweave-201/3.mdx @@ -450,6 +450,7 @@ upload Arweave transactions on your own. message: "Secret code: BZB48B", }, ]} + partnerTwitterHandle="@ar_io_network" /> ## Conclusion diff --git a/apps/academy/src/pages/tracks/oracles-api3/1-oracles-api3-pricefeeds.mdx b/apps/academy/src/pages/tracks/oracles-api3/1-oracles-api3-pricefeeds.mdx index d7f06374..6593bc69 100644 --- a/apps/academy/src/pages/tracks/oracles-api3/1-oracles-api3-pricefeeds.mdx +++ b/apps/academy/src/pages/tracks/oracles-api3/1-oracles-api3-pricefeeds.mdx @@ -1,6 +1,6 @@ import LessonLayout from "../../../components/LessonLayout"; import QuizStatusChecker from "../../../components/mdx/QuizStatusChecker"; -// import Question from "../../../components/mdx/Question"; +import Question from "../../../components/mdx/Question"; // import Callout from "../../../components/mdx/Callout"; // import LessonQuestionsModal from "../../../components/mdx/LessonQuestionsModal"; // import LessonInformationalModal from "../../../components/mdx/LessonInformationalModal"; @@ -11,6 +11,7 @@ import QuizStatusChecker from "../../../components/mdx/QuizStatusChecker"; authorPosition="Developer_DAO" authorTwitter="wc49358" createdDate="" + authorImage="/authors/default.png" > ## Oracles and API3 (Price Feeds) diff --git a/apps/academy/src/pages/tracks/oracles-api3/2-quantum-rand-num-gen.mdx b/apps/academy/src/pages/tracks/oracles-api3/2-quantum-rand-num-gen.mdx index 5b6189f7..84834d2f 100644 --- a/apps/academy/src/pages/tracks/oracles-api3/2-quantum-rand-num-gen.mdx +++ b/apps/academy/src/pages/tracks/oracles-api3/2-quantum-rand-num-gen.mdx @@ -11,8 +11,10 @@ import LessonLayout from "../../../components/LessonLayout"; authorPosition="Developer_DAO" authorTwitter="" createdDate="" + authorImage="/authors/default.png" + > -{/* */} +<>{/* */} diff --git a/apps/academy/src/pages/tracks/oracles-api3/3-airnode-deep-dive.mdx b/apps/academy/src/pages/tracks/oracles-api3/3-airnode-deep-dive.mdx index 0b8e785f..5eb59c34 100644 --- a/apps/academy/src/pages/tracks/oracles-api3/3-airnode-deep-dive.mdx +++ b/apps/academy/src/pages/tracks/oracles-api3/3-airnode-deep-dive.mdx @@ -6,13 +6,12 @@ import LessonLayout from "../../../components/LessonLayout"; // import LessonInformationalModal from "../../../components/mdx/LessonInformationalModal"; - -{/* */} - + <>{/* */} diff --git a/package.json b/package.json index 1a22563e..95da3b04 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "turbo": "1.10.11", "typescript": "5.1.6" }, - "packageManager": "pnpm@9.1.3", + "packageManager": "pnpm@9.0.6", "prisma": { "schema": "packages/database/prisma/schema.prisma", "seed": "ts-node --compiler-options {\"module\":\"CommonJS\"} packages/database/prisma/seed.ts" diff --git a/packages/database/prisma/schema.prisma b/packages/database/prisma/schema.prisma index aebeaf76..57356512 100644 --- a/packages/database/prisma/schema.prisma +++ b/packages/database/prisma/schema.prisma @@ -72,10 +72,11 @@ model Lessons { stagingVisible Boolean @default(true) visible Boolean @default(true) nextLessonPath String? + metaImagePath String @default("") // twitterShareUrl String? } - model Tags { +model Tags { id String @id @default(cuid()) tagName String tagDescription String @@ -110,6 +111,7 @@ model Tracks { stagingVisible Boolean @default(true) visible Boolean @default(true) contributors ContributorsOnTracks[] + metaImagePath String @default("") } model TagsOnTracks {