Skip to content

Commit 72b4136

Browse files
committed
updated ts package to v4 and documentation change
1 parent 14e27fa commit 72b4136

5 files changed

Lines changed: 49 additions & 112 deletions

File tree

docs/assets/blog-04-new-issue.png

127 KB
Loading

docs/getting_started.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,13 @@ This guide walks you through everything you need to write and publish a blog pos
1919

2020
## Step 1: Raise a New issue on GitHub
2121

22-
Head to the the GitHub issue on this [repository](https://github.com/recodehive/recode-website/issues)
22+
Head to the the GitHub issue on this [repository](https://github.com/recodehive/recode-website/issues), raise an new issue under documentation update.
2323
:::info
24+
* Few things to remember, don't raise random generic topics.
25+
* Write from real experience, try to include real dashboard pictures, no copy paste articles.
26+
* You can generate AI pictures, but need to be edited any tools like Canva.
27+
* Your article must teach something offical documentation doesnot. Means no Intro to X or What is X.
28+
* Start working on Issue When its assigned to you by @sanjay-kv or any Maintainer. ref step 4.
2429
<Tabs>
2530
<TabItem value="Step 1" label="Step 1">
2631
<BrowserWindow url="https://github.com/recodehive/recode-website/issues" bodyStyle={{padding: 0}}>
@@ -36,10 +41,17 @@ Head to the the GitHub issue on this [repository](https://github.com/recodehive/
3641
</TabItem>
3742

3843
<TabItem value="Step 3" label="Step 3">
39-
<BrowserWindow url="https://github.com/recodehive/recode-website/documentation" bodyStyle={{padding: 0}}>
40-
[![Github](assets\blog-03-new-issue.png)](https://github.com/recodehive/recode-website/documentations)
44+
<BrowserWindow url="https://github.com/recodehive/recode-website/issues/1586" bodyStyle={{padding: 0}}>
45+
[![Github](assets\blog-03-new-issue.png)](https://github.com/recodehive/recode-website/issues/1577)
4146
</BrowserWindow>
4247
</TabItem>
48+
49+
<TabItem value="Step 4" label="Step 4">
50+
<BrowserWindow url="https://github.com/recodehive/recode-website/issues/1577" bodyStyle={{padding: 0}}>
51+
[![Github](assets\blog-04-new-issue.png)](https://github.com/recodehive/recode-website/issues/1577)
52+
</BrowserWindow>
53+
</TabItem>
54+
4355
</Tabs>
4456

4557
:::

package-lock.json

Lines changed: 13 additions & 85 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@
4545
"@radix-ui/react-avatar": "^1.1.7",
4646
"@radix-ui/react-collapsible": "^1.1.12",
4747
"@radix-ui/react-slot": "^1.2.3",
48-
"@tsparticles/react": "^3.0.0",
48+
"@tsparticles/engine": "^4.0.5",
49+
"@tsparticles/react": "^4.0.5",
4950
"@tsparticles/slim": "^4.0.5",
5051
"@vercel/analytics": "^1.5.0",
5152
"canvas-confetti": "^1.9.3",

src/components/particle.tsx

Lines changed: 19 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,11 @@
11
import * as React from "react";
2-
import Particles, { initParticlesEngine } from "@tsparticles/react";
3-
import { useEffect, useMemo, useState } from "react";
2+
import Particles, { ParticlesProvider } from "@tsparticles/react";
3+
import { useCallback, useMemo } from "react";
44
import { loadSlim } from "@tsparticles/slim";
55

66
const ParticlesComponent = (props) => {
7-
const [init, setInit] = useState(false);
8-
9-
useEffect(() => {
10-
initParticlesEngine(async (engine) => {
11-
await loadSlim(engine);
12-
}).then(() => {
13-
setInit(true);
14-
});
7+
const particlesInit = useCallback(async (engine) => {
8+
await loadSlim(engine);
159
}, []);
1610

1711
const particlesLoaded = (container) => {
@@ -96,19 +90,21 @@ const ParticlesComponent = (props) => {
9690
);
9791

9892
return (
99-
<div
100-
style={{
101-
position: "fixed",
102-
width: "100vw",
103-
height: "100vh",
104-
top: 0,
105-
left: 0,
106-
zIndex: -1, // Critical: ensures it's in the background
107-
pointerEvents: "none", // Ensures it doesn't block clicks
108-
}}
109-
>
110-
<Particles id={props.id} options={options} />
111-
</div>
93+
<ParticlesProvider init={particlesInit}>
94+
<div
95+
style={{
96+
position: "fixed",
97+
width: "100vw",
98+
height: "100vh",
99+
top: 0,
100+
left: 0,
101+
zIndex: -1, // Critical: ensures it's in the background
102+
pointerEvents: "none", // Ensures it doesn't block clicks
103+
}}
104+
>
105+
<Particles id={props.id} options={options} particlesLoaded={particlesLoaded} />
106+
</div>
107+
</ParticlesProvider>
112108
);
113109
};
114110

0 commit comments

Comments
 (0)