Skip to content

Commit c6fb5ae

Browse files
committed
"update all"
1 parent 3e8e189 commit c6fb5ae

5 files changed

Lines changed: 66 additions & 51 deletions

File tree

next.config.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import type { NextConfig } from "next";
22

33
const nextConfig: NextConfig = {
44
/* config options here */
5+
reactStrictMode: true,
6+
//swcMinify: true, // Ensure SWC is enabled for faster builds
57

68
output:"export",
79
images: { unoptimized: true },

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"flowbite-react": "^0.10.2",
1818
"gray-matter": "^4.0.3",
1919
"matter-js": "^0.20.0",
20-
"next": "15.1.7",
20+
"next": "15.2.0",
2121
"react": "^19.0.0",
2222
"react-dom": "^19.0.0",
2323
"react-emoji-render": "^2.0.1",
@@ -30,6 +30,7 @@
3030
},
3131
"devDependencies": {
3232
"@eslint/eslintrc": "^3",
33+
"@types/matter-js": "^0.19.8",
3334
"@types/node": "^20",
3435
"@types/react": "^19",
3536
"@types/react-dom": "^19",

pnpm-lock.yaml

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

src/app/apps/page.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
import MatterSimulation from '@/components/matter'
1+
"use client"
2+
3+
import {MatterSimulation} from '@/components/matter'
24

35
export default function Apps(){
46
return(
5-
<section>
7+
<div>
68
<MatterSimulation />
7-
</section>
9+
</div>
810
)
911
}

src/components/matter.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1-
import { useEffect, useRef } from 'react';
1+
"use client"
2+
3+
import React, { useEffect, useRef } from 'react';
24
import Matter from 'matter-js';
35

4-
const MatterSimulation = () => {
6+
7+
8+
export function MatterSimulation({ref}){
59
const canvasRef = useRef(null);
610

711
useEffect(() => {
@@ -83,11 +87,9 @@ const MatterSimulation = () => {
8387
}, []);
8488

8589
return(
86-
<div>
87-
<canvas ref={canvasRef}>
88-
</canvas>
90+
<div>
91+
<canvas ref={canvasRef} />
8992
</div>
9093
);
9194
};
9295

93-
export default MatterSimulation;

0 commit comments

Comments
 (0)