Skip to content

Commit b047750

Browse files
committed
vercel fix
1 parent 8f010dc commit b047750

2 files changed

Lines changed: 14 additions & 17 deletions

File tree

docs/getting_started.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,26 +29,26 @@ Head to the the GitHub issue on this [repository](https://github.com/recodehive/
2929
<Tabs>
3030
<TabItem value="Step 1" label="Step 1">
3131
<BrowserWindow url="https://github.com/recodehive/recode-website/issues" bodyStyle={{padding: 0}}>
32-
[![Github](assets\blog-01-new-issue.png)](https://github.com/recodehive/recode-website/issues)
32+
[![Github](assets/blog-01-new-issue.png)](https://github.com/recodehive/recode-website/issues)
3333
</BrowserWindow>
3434
</TabItem>
3535

3636
<TabItem value="Step 2" label="Step 2">
3737
<BrowserWindow url="https://github.com/recodehive/recode-website/documentation" bodyStyle={{padding: 0}}>
38-
[![Github](assets\blog-02-new-issue.png)](https://github.com/recodehive/recode-website/documentations)
38+
[![Github](assets/blog-02-new-issue.png)](https://github.com/recodehive/recode-website/documentations)
3939
</BrowserWindow>
4040

4141
</TabItem>
4242

4343
<TabItem value="Step 3" label="Step 3">
4444
<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)
45+
[![Github](assets/blog-03-new-issue.png)](https://github.com/recodehive/recode-website/issues/1577)
4646
</BrowserWindow>
4747
</TabItem>
4848

4949
<TabItem value="Step 4" label="Step 4">
5050
<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)
51+
[![Github](assets/blog-04-new-issue.png)](https://github.com/recodehive/recode-website/issues/1577)
5252
</BrowserWindow>
5353
</TabItem>
5454

@@ -61,7 +61,7 @@ Head to the the GitHub issue on this [repository](https://github.com/recodehive/
6161

6262
## Step 3: Create a New Branch
6363

64-
Never commit directly to `main`. Create a dedicated branch for your blog post:
64+
Never commit directly to `main`. Create a dedicated branch for your blog post: test
6565

6666
```bash
6767
git checkout -b blog/your-blog-title

src/components/particle.tsx

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,9 @@ import * as React from "react";
22
import Particles, { ParticlesProvider } from "@tsparticles/react";
33
import { useCallback, useMemo } from "react";
44
import { loadSlim } from "@tsparticles/slim";
5+
import BrowserOnly from "@docusaurus/BrowserOnly";
56

6-
const initParticles = async (engine: Engine) => {
7-
await loadSlim(engine);
8-
};
9-
10-
const ParticlesComponent = (props) => {
7+
const ParticlesInner = (props) => {
118
const particlesInit = useCallback(async (engine) => {
129
await loadSlim(engine);
1310
}, []);
@@ -89,10 +86,6 @@ const ParticlesComponent = (props) => {
8986
[],
9087
);
9188

92-
if (!init) {
93-
return null;
94-
}
95-
9689
return (
9790
<ParticlesProvider init={particlesInit}>
9891
<div
@@ -102,14 +95,18 @@ const ParticlesComponent = (props) => {
10295
height: "100vh",
10396
top: 0,
10497
left: 0,
105-
zIndex: -1, // Critical: ensures it's in the background
106-
pointerEvents: "none", // Ensures it doesn't block clicks
98+
zIndex: -1,
99+
pointerEvents: "none",
107100
}}
108101
>
109-
<Particles id={props.id} options={options} particlesLoaded={particlesLoaded} />
102+
<Particles id={props.id} options={options} />
110103
</div>
111104
</ParticlesProvider>
112105
);
113106
};
114107

108+
const ParticlesComponent = (props) => (
109+
<BrowserOnly>{() => <ParticlesInner {...props} />}</BrowserOnly>
110+
);
111+
115112
export default ParticlesComponent;

0 commit comments

Comments
 (0)