Why when using Symfony UX and Forms I get INVALID CSRF TOKEN?

I have a question regarding Symfony UX Live Components and forms.

Context:

Imagine you have a Parent Component and a nested Child Component. Both are Live Components and both include Symfony FORMS (FormBuilder). However, the submit button for the child’s form is located in the Parent Component, and I use a LiveComponent emit to dispatch an event that the child’s save method listens for.

Although the event arrives correctly, I get an Invalid CSRF-TOKEN error coming from the child component.

While investigating, I discovered that Turbo UX uses the csrf_protection_controller.js Stimulus controller to generate a CSRF token. What does this imply? Must I disable Symfony’s default CSRF token handling for forms?

In my csrf.yaml, I currently have:

# Enable stateless CSRF protection for forms and logins/logouts
framework:
    form:
        csrf_protection:
            token_id: submit

    csrf_protection:
        check_header: true
        stateless_token_ids:
            # - submit
            - authenticate
            - logout

When I disable the submit entry under stateless_token_ids, the form no longer raises a CSRF error. If I inspect the Symfony Profiler (under the child’s save request → Forms), it shows :

Screenshot of Symfony Profiler

Does the CSRF token still exist, and should I therefore leave submit disabled in csrf.yaml?

Why aren’t there clear references or documentation explaining that Turbo UX uses its own controller for token generation and CSRF handling?

Thank you very much!

How to add custom content or static HTML below dynamic coupon listings in a PHP-based store page? [closed]

I purchased a PHP-based coupon theme for my site, and I’m trying to customize the store pages. Here’s an example page: https://flashvoucher.com/store/a2-hosting

Currently, the page shows the list of coupons dynamically fetched from the database. However, there’s no option in the theme settings to add static content (like a small paragraph or HTML block) below the coupon list. I want to add some SEO-friendly text, maybe 200–300 words about the store, right after the coupons end.

The theme uses PHP templates and seems to be built using procedural PHP (not any modern frameworks). I can edit the template files directly.

Question:
What would be the best way to inject custom content (manually or via admin, if possible) just below the dynamic content block? Should I:

Modify the template file and hardcode the HTML block?

Use output buffering or hooks (if available)?

Append content via controller logic if it exists?

Any advice or code example would be appreciated.

Opcache question moving from php 8.0 to 8.3

On Almalinux 8 PHP 8.0 and 8.3 are installed.
The default php release is 8.0 (php -v = 8.0) and all running websites use php 8.0 in FPM mode.

I want to move all to php 8.3

Sites are wordpress, so I can easily change php version there, but my question is about opcache (installed on both release). I check the opcache status using opcache-gui (https://github.com/amnuts/opcache-gui) that currently shows that it is running for php 8.0

I began to move one website to 8.3. Site is working but opcache-gui doesn’t show the cached files from this site. Is it because the server default php is 8.0, so opcache-gui only shows the cached files of sites under php 8.0? So, if I set the server default php to 8.3, will opcache-gui automatically monitor the php 8.3 opcache system, or are there additional setups to do?

Thank you!

Issue with browsershot generating pdf only in prod

I am trying to use spatie laravel-pdf which uses browsershot under the hood to generate a pdf. I get the bellow error only on the production server when trying to generate the pdf which seems to not include any useful information regarding the problem. The index.html file does contain the contents I’m expecting. Confirmed nodejs folder in system path env variable.

The command “node C:inetpubwwwrootmyprojectvendorspatiebrowsershotsrc/../bin/browser.cjs “{“”url””:””file://C:WindowsTEMP607378296-0455840001752189861index.html””,””action””:””pdf””,””options””:{“”args””:[],””viewport””:{“”width””:800,””height””:600},””displayHeaderFooter””:false,””margin””:{“”top””:””0.25in””,””right””:””0.25in””,””bottom””:””0.25in””,””left””:””0.25in””},””format””:””letter””,””landscape””:true,””printBackground””:true}}”” failed. Exit Code: 1(General error) Working directory: C:inetpubwwwrootmyprojectpublic Output: ================ Error Output: ================

I have the following controller method which is used to generate the pdf.

<?php

namespace AppHttpControllers;

use SpatieLaravelPdfEnumsFormat;
use SpatieLaravelPdfEnumsUnit;
use SpatieLaravelPdfFacadesPdf;

class ExportController extends Controller
{
    public function pdf() {
        $pdf = Pdf::view('table-pdf');

        return $pdf->format(Format::Letter)
            ->margins(0.25, 0.25, 0.25, 0.25, Unit::Inch)
            ->landscape()
            ->name("myfile.pdf");
    }
}

I’ve tried using withBrowserShot method and called setNodeBinary() and noSandbox() methods, neither of which made any difference. Any ideas as to where to start? I’ve tried uninstalling and reinstalling puppeteer which did not help.

Latest Telescope does not work if Laravel is in a subfolder & Quick Fix Also Not Working

Telescope Version : 5.10

Laravel Version : 10.48.29

PHP Version : 8.3.11

Issue

Laravel runs in a subfolder. This means only urls starting with /foo/ get routed to Laravel’s index.php. Other urls like /telescope/ are out of laravels control. Laravel’s router is smart enough to check that it is in a subforlder and ignores /foo/ in the url when matching routes. As a result the route “/telescope” automatically get converted to “example.com/foo/telescope” when printing routes with route() and the router maps /foo/telescope to telescopes controller. Telescope is not so smart. It takes the path from the config “path” => “telescope” and creates urls starting with “/telescope”. If i change it to “path” => “foo/telescope” Laravel’s router interprets them as “/foo/foo/telescope”. This results in Telescope still being incorrect because its javascript tries to send api requests to “/foo/telescope/telescope-api” but “/foo/foo/telescope/telescope” would be correct.

Quick Fix – Not Working

I’ve tried adding this fix in the bottom part also in header in both cases the path and basePath is going back to /telescope.

    @php
        $url = parse_url(config('app.url'));
        $basePath = isset($url['path']) ? $url['path'] . '/telescope' : 'telescope';
        $path = isset($url['path']) ? ltrim($url['path'], '/') . '/telescope' : 'telescope';
        $vars = LaravelTelescopeTelescope::scriptVariables();
        $vars['basePath'] = $basePath;
        $vars['path'] = $path;
    @endphp

    <script>
        window.Telescope = @json($vars);
        console.log(window.Telescope.basePath);
        console.log(window.Telescope.path);
    </script>

How to build and use a local, forked version of @kitware/vtk.js?

I need to make custom modifications to the @kitware/vtk.js library for my project. I have forked the official repository, cloned it to my local machine, and made my changes.
Now, I’m struggling to use this modified local version in my main application.

I have my project structure set up like this: /my-dev-folder
|– /my-vtk-clone (The forked and modified vtk.js repo)
|– /my-app (The project where I want to use the modified vtk.js)

In my my-app project, I modified my package.json to point to my local clone:

“@kitware/vtk.js”: “file:../my-vtk-clone”

Then I ran npm install. The installation completed without errors, and the my-vtk-clone folder was linked into node_modules. However, when I try to run my application, I get module resolution errors, for example:

Method 2: npm pack
I went into my my-vtk-clone directory and ran npm pack. This generated a kitware-vtk.js-29.10.2.tgz file (version may vary).
Then, in my my-app project, I tried installing from this packed file:

npm install ../my-vtk-clone/kitware-vtk.js-29.10.2.tgz

This also seemed to install correctly, but I ran into the same module resolution errors at runtime.

After inspecting the node_modules directory, I noticed a major difference between the official package and my local version.

When I install the official package (npm install @kitware/vtk.js):

The directory structure inside node_modules/@kitware/vtk.js looks something like this (simplified):
|– /Common
|– /Filters

When I use my local version (via npm install file:… or npm pack):

|– /Sources
| |– /Common
| |– /Filters
| |– …etc

My local version has the raw Sources directory, and it seems my application’s bundler (Webpack/Vite) doesn’t know how to resolve imports from it. The official package on NPM is clearly a built or published version, not the raw source code.

My Question:
What is the correct process to build my forked vtk.js repository so that it generates the same distributable file structure (dist/, esm/, etc.) as the official NPM package? Is there a specific npm run command I am missing?

Custom widget for visualizing dynamic table data

While creating a custom widget for visualizing dynamic table data, I encountered some issues and would like to share a minimal working example to illustrate the problem.

JS:

self.ctx.$scope.showAlert = function() {
window.alert("my device");
};

self.ctx.$scope.var = [
"id: 1, name: 'Batch A'",
"id: 2, name: 'Batch B'"
];

self.ctx.$scope.datasourceData = [];

self.ctx.detectChanges();
};

HTML:

<div class="mainCard">
<h3>Hello World</h3>
<button mat-raised-button color="primary" (click)="showAlert()">Click me</button>

<p>{{ctx.$scope.var}}</p>

<ul>
<li ng-repeat="item in ctx.$scope.var">
Wert: {{item}}
</li>
</ul>

<h3>Einzelne Werte</h3>
<p>Erster Wert: {{ctx.$scope.var}}</p>
</div>

What works:

  • The alert button (showAlert) works correctly.
  • Displaying the entire array ({{ctx.$scope.var}}) also works.

Problems:

  • Accessing array items directly (e.g. {{ctx.$scope.var[1]}}) throws an error:
    “Widget Error: can’t access property 1, ctx.ctx.$scope.var is undefined”
    -ng-repeat does not render any list items, although the array is initialized as expected in onInit.

Is there a recommended way to bind and access dynamic arrays within ThingsBoard widgets—especially when aiming to use ng-repeat or direct indexing?

WASD controls on my three JS section not working properly making the screen glitch when moving foward

I am working in react, with a section in three.js where you can move forward with WASD and not the arrow because the arrows affect the scroll, to turn the camera, you have to drag the mouse, I have tried adding code, removing it for the WASD part but the same glitch is repeating itself. Would you have an idea why?

import React, { useEffect, useRef, useState } from "react";
import * as THREE from "three";
import { GLTFLoader }      from "three/examples/jsm/loaders/GLTFLoader.js";
import { Water }           from "three/examples/jsm/objects/Water.js";
import { OrbitControls }   from "three/examples/jsm/controls/OrbitControls.js";

export default function ExhibitionSection() {
  const mount   = useRef(null);
  const [showUI, setShowUI] = useState(true);       // overlay flag

  useEffect(() => {
    /* ---------- renderer / scene / camera ---------- */
    const { innerWidth: W, innerHeight: H } = window;
    const scene = new THREE.Scene();
    scene.fog   = new THREE.FogExp2(0x8a5000, 0.0005);   // lighter fog

    const cam = new THREE.PerspectiveCamera(75, W / H, 0.1, 1e6);
    cam.position.set(0, 400, 400);   // eye-level = 400, looking straight

    const renderer = new THREE.WebGLRenderer({ antialias: true });
    renderer.setSize(W, H);
    renderer.outputEncoding = THREE.sRGBEncoding;
    mount.current.appendChild(renderer.domElement);

    /* ---------- orbit controls ---------- */
    const controls = new OrbitControls(cam, renderer.domElement);
    controls.enableZoom   = false;
    controls.enablePan    = false;
    controls.dampingFactor = 0.05;
    controls.enableDamping = true;
    controls.target.set(0, 400, 0);      // same Y as camera → level view
    controls.update();
    renderer.domElement.addEventListener("wheel", e => e.preventDefault(), { passive:false });

    /* ---------- skybox ---------- */
    scene.background = new THREE.CubeTextureLoader().load([
      "/images/yellowcloud_ft.jpg","/images/yellowcloud_bk.jpg",
      "/images/yellowcloud_up.jpg","/images/yellowcloud_dn.jpg",
      "/images/yellowcloud_rt.jpg","/images/yellowcloud_lf.jpg",
    ]);

    /* ---------- water ---------- */
    const water = new Water(
      new THREE.PlaneGeometry(50000, 50000),
      {
        textureWidth:512, textureHeight:1024,
        waterNormals: new THREE.TextureLoader().load("/images/waterNormals.jpg", t=>{
          t.wrapS = t.wrapT = THREE.RepeatWrapping;
        }),
        sunDirection:new THREE.Vector3(), sunColor:0xffffff,
        waterColor:0x001e0f, distortionScale:3.7, fog:true,
      }
    );
    water.rotation.x = -Math.PI/2;
    water.rotation.z = -Math.PI/2;
    scene.add(water);

    /* ---------- model ---------- */
    new GLTFLoader().setPath("/models/")
      .load("photography-museum.glb", gltf=>{
        const m = gltf.scene;
        m.scale.set(10,10,10);
        m.position.set(0,-200,0);
        scene.add(m);
      });

    /* ---------- lights ---------- */
    scene.add(new THREE.AmbientLight(0x8a5000,2.5));
    const dir = new THREE.DirectionalLight(0x8a5000,1);
    dir.position.set(1300,1000,1000);
    scene.add(dir);

    /* ---------- keyboard / physics ---------- */
const keys = {};
let   vy   = 0;           // vertical velocity
const GRAVITY  = 2000;    // world-units / s²
const WALK     = 350;     // walk speed
const EYE_Y    = 400;     // ground level (eye height)

window.addEventListener("keydown", e => { keys[e.code] = true; });
window.addEventListener("keyup",   e => { keys[e.code] = false; });

// jump
window.addEventListener("keydown", e => {
  if (e.code === "Space") {
    e.preventDefault();
    if (Math.abs(cam.position.y - EYE_Y) < 1) vy = 700;   // only if on ground
  }
});


   /* ---------- main loop ---------- */
const clock = new THREE.Clock();
(function animate() {
  requestAnimationFrame(animate);
  const dt = clock.getDelta();

  /* WASD movement */
  const dir = new THREE.Vector3(
    (keys.KeyD ? 1 : 0) - (keys.KeyA ? 1 : 0), // x
    0,
    (keys.KeyS ? 1 : 0) - (keys.KeyW ? 1 : 0)  // z
  );
  if (dir.lengthSq() > 0) {
    dir.normalize()
       .applyQuaternion(cam.quaternion)  // local → world
       .setY(0)                          // stay horizontal
       .normalize();

    const speed = (keys.ShiftLeft || keys.ShiftRight) ? WALK * 2 : WALK;
    cam.position.addScaledVector(dir, speed * dt);
  }

  /* jump / gravity */
  vy -= GRAVITY * dt;
  cam.position.y += vy * dt;
  if (cam.position.y < EYE_Y) { cam.position.y = EYE_Y; vy = 0; }

  /* keep the look-at target at eye level */
  controls.target.y = cam.position.y;

  controls.update();
  water.material.uniforms.time.value += dt;
  renderer.render(scene, cam);
})();


    /* ---------- resize ---------- */
    function onResize(){
      cam.aspect = window.innerWidth/window.innerHeight;
      cam.updateProjectionMatrix();
      renderer.setSize(window.innerWidth,window.innerHeight);
    }
    window.addEventListener("resize", onResize);

    return ()=> {
      window.removeEventListener("resize", onResize);
      controls.dispose(); renderer.dispose();
      mount.current.removeChild(renderer.domElement);
    };
  }, []);

  return (
    <div ref={mount} className="relative w-full h-screen">
      {showUI && (
        <div className="absolute inset-0 z-50 flex flex-col items-center justify-center bg-black/70 text-white px-6 text-center space-y-6">
          <h2 className="text-3xl md:text-4xl font-bold tracking-wide">
            Explore&nbsp;LA&nbsp;DISCONNECT&nbsp;1.0
          </h2>
          <p className="max-w-md text-sm opacity-80 leading-relaxed">
            Click + drag to look around.<br/>
            Move with&nbsp;W&nbsp;A&nbsp;S&nbsp;D, hold&nbsp;Shift&nbsp;to run,
            press&nbsp;Space&nbsp;to jump.
          </p>
          <button
            onClick={() => {
              setShowUI(false);
              // ensure canvas gets keyboard focus after overlay closes
              setTimeout(()=> mount.current?.focus(), 50);
            }}
            className="border border-white px-6 py-3 uppercase text-sm hover:bg-white hover:text-black transition"
          >
            Visit the exhibition
          </button>
        </div>
      )}
    </div>
  );
}

I need web developer collaborators as a beginner to teach me some frontend process

https://github.com/mosescompworld/TRAVEL-AGENCY-PROJECT-CODECAMP/pull/1

I’m currently learning web development and Git.
I need help from experienced developers with the following:

Making the site mobile responsive
helping me in detailed process completing frontend
testing and also the backend of this project
To make this travel agency website a functioning
Improving design (modern layout, animations)
Adding JavaScript interactivity (e.g., sliders, contact forms)
General code review and folder structure tips
Looking for Collaborators

How to set use the 100% of vacant space

My page has two blocks

<div class=texts"></div>
<div class="tablewrapper"></div>

What I want to do is

  • no scroll bar on whole page.
  • div class="texts" height is not fixed.
  • use scroll bar for div class="tablewrapper" if it overflow.

However the code below doesn’t work.

Does anyone help?

.pagewrapper{
  height:100vh;
  overflow:hidden;
}
.tablewrapper{
overflow-y:scroll;
/*height:calc(100vh-textsheight)*/
}

.table{
width:"100vh";
}
<div class="pagewrapper">
<div class="texts">
Thse texts are chanable.<br>
Thse texts are chanable..<br>
Thse texts are chanable..<br>
Thse texts are chanable..<br>
Thse texts are chanable..<br>
Thse texts are chanable..<br>
Thse texts are chanable..<br>
</div>
<div class="tablewrapper">
<table class="table" border>
<tr><td>1</td></tr>
<tr><td>2</td></tr>
<tr><td>3</td></tr>
<tr><td>4</td></tr>
<tr><td>5</td></tr>
<tr><td>6</td></tr>
<tr><td>7</td></tr>
<tr><td>8</td></tr>
</table>
</div>
</div>

[iOS][v0.73] JS run result not expected when return value in catch

    const loading = [1];
    console.log('====before catch', loading);
    try {
      await Promise.reject(new Error('error'));
    } catch (e) {
      return false;
    } finally {
      console.log('====finally', loading);
    }

Why the console result of the above code snippets is error not [1] ?

const loading = [1];
try {
  await Promise.reject(new Error('error'));
} catch (e) {
  return false;
} finally {
  console.log('====finally', loading);
}
const loading = [1];
try {
  await Promise.reject(new Error('error'));
} catch (e) {
  // return false;
} finally {
  console.log('====finally', loading);
}

But these code snippets consoles correct!
It only happens in iOS. RN version 0.7x, it ok in 0.6x

see the details above

uncaught TypeError: can’t access property “elements”, m is undefined in three.core.js while using three-loader-3dtiles library

I’m experiencing a runtime error when using the three-loader-3dtiles library.

“Uncaught TypeError: can’t access property ‘elements”, m is undefined”. The error occurs when I try to update the runtime using the

  useFrame(({ size, camera }, dt) => {
    if (runtime) runtime.update(dt, size.height, camera);
  });

But If I comment out above line, the error goes away, but the 3D tiles are not rendered.

here is my code
loader-3dtiles-rf3.tsx

import { Loader3DTiles, LoaderProps, Runtime } from 'three-loader-3dtiles';
import { useLoader, useThree, useFrame } from '@react-three/fiber';
import { Loader, Vector2 } from 'three';

class Loader3DTilesBridge extends Loader {
  props: LoaderProps;

  load(url, onLoad, onProgress, onError) {
    const loadTileset = async () => {
      try {
        const result = await Loader3DTiles.load({
          url,
          ...this.props,
          onProgress,
        });
        onLoad(result);
        console.log('result', result);
      } catch (e) {
        console.log('Error loading 3d tiles!', e);
        onError(e);
      }
    };
    loadTileset();
  }
  setProps(props) {
    this.props = props;
  }
}

function Loader3DTilesR3FAsset(props) {
  const threeState = useThree();
  const loaderProps = {
    renderer: threeState.gl,
    viewport: getViewport(threeState.gl),
    options: {
      ...props,
    },
  };

  // TODO: Getting type error
  // @ts-ignore
  const { model, runtime } = useLoader(Loader3DTilesBridge, props.url, (loader: Loader3DTilesBridge) => {
    loader.setProps(loaderProps);
  });

  useFrame(({ size, camera }, dt) => {
    if (runtime) runtime.update(dt, size.height, camera);
  });

  return (
    <group {...props} dispose={runtime.dispose}>
      <primitive object={model} />
    </group>
  );
}
function getViewport(renderer) {
  const viewSize = renderer.getSize(new Vector2());
  return {
    width: viewSize.x,
    height: viewSize.y,
    devicePixelRatio: renderer.getPixelRatio(),
  };
}

export { Loader3DTilesR3FAsset };
import { Loader3DTiles, LoaderProps, Runtime } from 'three-loader-3dtiles';
import { useLoader, useThree, useFrame } from '@react-three/fiber';
import { Loader, Vector2 } from 'three';


class Loader3DTilesBridge extends Loader {
  props: LoaderProps;


  load(url, onLoad, onProgress, onError) {
    const loadTileset = async () => {
      try {
        const result = await Loader3DTiles.load({
          url,
          ...this.props,
          onProgress,
        });
        onLoad(result);
        console.log('result', result);
      } catch (e) {
        console.log('Error loading 3d tiles!', e);
        onError(e);
      }
    };
    loadTileset();
  }
  setProps(props) {
    this.props = props;
  }
}


function Loader3DTilesR3FAsset(props) {
  const threeState = useThree();
  const loaderProps = {
    renderer: threeState.gl,
    viewport: getViewport(threeState.gl),
    options: {
      ...props,
    },
  };


  // TODO: Getting type error
  // @ts-ignore
  const { model, runtime } = useLoader(Loader3DTilesBridge, props.url, (loader: Loader3DTilesBridge) => {
    loader.setProps(loaderProps);
  });


  useFrame(({ size, camera }, dt) => {
    if (runtime) runtime.update(dt, size.height, camera);
  });


  return (
    <group {...props} dispose={runtime.dispose}>
      <primitive object={model} />
    </group>
  );
}
function getViewport(renderer) {
  const viewSize = renderer.getSize(new Vector2());
  return {
    width: viewSize.x,
    height: viewSize.y,
    devicePixelRatio: renderer.getPixelRatio(),
  };
}


export { Loader3DTilesR3FAsset };

and I’m rendering in canva bu rf3 this way

<Canvas shadows style={{ background: '#272730' }}>
        <PerspectiveCamera ref={camera}>
          <Suspense fallback={null}>
            <Loader3DTilesR3FAsset
              dracoDecoderPath={'https://unpkg.com/[email protected]/examples/jsm/libs/draco'}
              basisTranscoderPath={'https://unpkg.com/[email protected]/examples/jsm/libs/basis'}
              rotation={new THREE.Euler(-Math.PI / 2, 0, 0)}
              url="https://int.nyt.com/data/3dscenes/ONA360/TILESET/0731_FREEMAN_ALLEY_10M_A_36x8K__10K-PN_50P_DB/tileset_tileset.json"
              maximumScreenSpaceError={48}
            />
          </Suspense>
        </PerspectiveCamera>
        <OrbitControls camera={camera.current} />
     </Canvas>

Duplicate OrderID detected error in MongoDB

I am getting this error in my console and I use unique for the OrderID, I have tried using UUID, counter and MongoDB code, after I create a first receipt any other one that follows return this message in the console and display internal
Server error

“ Receipt created successfully: ORD00001
About to save receipt with ID: ORD00002
Duplicate orderId ORD00002 detected, retrying…
About to save receipt with ID: ORD00003
Duplicate orderId ORD00003 detected, retrying…
About to save receipt with ID: ORD00004
Duplicate orderId ORD00004 detected, retrying…
About to save receipt with ID: ORD00005
Duplicate orderId ORD00005 detected, retrying…
About to save receipt with ID: ORD00006
Duplicate orderId ORD00006 detected, retrying…””

Why is my tsparticles canvas not showing anything?

I see the canvas tag and element inside the DOM, but I don’t see anything. I’ve searched online everywhere but nothing seems to fix it. I have a mouse glow effect so I tried turning that off since the canvas for that might’ve interfered but it’s still not working.

I am using react and tsparticles

This is my jsx:

import styles from './Hero.module.css';
import { useEffect, useRef } from 'react';
import Typed from 'typed.js';
import Particles from '@tsparticles/react';
import { loadSlim } from '@tsparticles/slim';

export default function Hero() {
    const typedRef = useRef(null);
    const typedInstance = useRef(null);

    const particlesInit = async(main) => {
        await loadSlim(main);
    };

    const particlesLoaded = (container) => {
        console.log(container);

    }

    useEffect(() => {
        typedInstance.current = new Typed(typedRef.current, {
        strings: ['software engineer.', ' student.'],
        typeSpeed: 90,
        backSpeed: 30,
        backDelay: 1000,
        loop: true,
        cursorChar: '|'
    });

    return () => {
      typedInstance.current.destroy();
    };
  }, []);
    return (
        <div className={styles.heroContainer}>
            <Particles
                id="tsparticles"
                init={particlesInit}
                loaded={particlesLoaded}
                options={{
                    background: {
                        color: {
                            value: "transparent",
                        },
                    },
                    fpsLimit: 120,
                    interactivity: {
                        events: {
                            onClick: {
                                enable: false,
                                mode: "push",
                            },
                            onHover: {
                                enable: false,
                                mode: "repulse",
                            },
                            resize: true,
                        },
                        modes: {
                            push: {
                                quantity: 4,
                            },
                            repulse: {
                                distance: 200,
                                duration: 0.4,
                            },
                        },
                    },
                    particles: {
                        color: {
                            value: "#ffffff",
                        },
                        links: {
                            color: "#ffffff",
                            distance: 150,
                            enable: true,
                            opacity: 0.5,
                            width: 1,
                        },
                        collisions: {
                            enable: false,
                        },
                        move: {
                            direction: "none",
                            enable: true,
                            outModes: {
                                default: "bounce",
                            },
                            random: true,
                            speed: 0.5,
                            straight: false,
                        },
                        number: {
                            density: {
                                enable: true,
                                area: 800,
                            },
                            value: 80,
                        },
                        opacity: {
                            value: 0.5,
                        },
                        shape: {
                            type: "circle",
                        },
                        size: {
                            value: { min: 1, max: 3 },
                            random: true,
                        },
                    },
                    detectRetina: true,
                }}
            />
            <div className={styles.main}>
                <p className={styles.greeting}>Hi, I am</p>
                <h1 className={styles.nameContainer}><span className={styles.name}>bob</span></h1>
                <h2 className={styles.secondaryText}>I am a <span ref={typedRef}></span></h2>
            </div>
        </div>
    );
}

and this is my CSS

.heroContainer {
    position:relative;
    overflow:hidden;

    display:flex;
    flex-direction:column;
    justify-content: center;

    max-width:100%;
    height:100vh;
    background-color:#171b22;
}

#tsparticles {
    position:absolute;
    top:0;
    left:0;

    width:100%;
    height:100%;
    z-index:-1;
}

.main {
    position: relative;
    z-index: 2;

    display:flex;
    flex-direction:column;
    justify-content:center;
    width:100%;
    max-width:clamp(600px, 1200px, 1500px);
    
    margin-left:auto;
    margin-right: auto;
    padding-left: 16px;
    padding-right: 16px;

    text-align:left;
    color:#e0e0e0;

}

.greeting, .nameContainer, .secondaryText{
    padding: 0px;
    margin: 0px;
    transition: transform 0.3s ease-in-out;
}

.greeting:hover, .nameContainer:hover, .secondaryText:hover {
    transform: scale(1.05);
}

h1 {
    font-size: 80px;
}

.secondaryText {
    font-size: 25px;
    color:#e0e0e0;
}


p {
    font-size:20px;
    color:#e0e0e0;
}

.name {
    background:linear-gradient(90deg, #ffde0e 10%, #e4a053 60%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;

    text-shadow: 0 0 3px rgba(255, 222, 14, 0.4), 0 0 5px rgba(228, 160, 83, 0.4);
}

h1, h2, p {
    margin: 0px;
}