Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/(core)/components/Layout.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default function Layout({
starColor = "AEE3FF",
starOpacity = 0.4,
}) {
const { t, meta } = useTranslation();
const { meta } = useTranslation();
const isCompleted = meta?.completed || false;
return (
<>
Expand Down
5 changes: 2 additions & 3 deletions app/(core)/components/P5Wrapper.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const loadP5Library = (() => {
cached = P5;
return resolve(cached);
}
} catch (_) {}
} catch {}

if (typeof window.p5 === "function") {
cached = window.p5;
Expand Down Expand Up @@ -103,7 +103,7 @@ export default function P5Wrapper({ sketch, simInfos }) {
try {
cleanupInstance(instance);
instance.remove();
} catch (_) {}
} catch {}
};

// Centralised resize logic
Expand Down Expand Up @@ -154,7 +154,6 @@ export default function P5Wrapper({ sketch, simInfos }) {
// body spawn positions use the correct canvas dimensions even
// when p._userNode.clientHeight is still 0 at this point.
const h = containerRef.current?.clientHeight ?? 0;
const w = containerRef.current?.clientWidth ?? 0;
if (h > 0) setCanvasHeight(h);

// Run the sketch's own setup (calls p.createCanvas internally).
Expand Down
2 changes: 1 addition & 1 deletion app/(core)/components/Screen.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import useTranslation from "../hooks/useTranslation.ts";
function Screen({ sketch }) {
const containerRef = useRef(null);
const p5Instance = useRef(null);
const { t, meta } = useTranslation();
const { meta } = useTranslation();
const isCompleted = meta?.completed || false;

useEffect(() => {
Expand Down
2 changes: 1 addition & 1 deletion app/(core)/components/SimulationLayout.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default function SimulationLayout({
children,
dynamicInputs,
}) {
const { t, meta } = useTranslation();
const { meta } = useTranslation();
const isCompleted = meta?.completed || false;

const theory = useMemo(() => {
Expand Down
13 changes: 1 addition & 12 deletions app/(pages)/blog/[slug]/page.jsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
import { blogsArray } from "../../../(core)/data/articles/index.js";
import { notFound } from "next/navigation";
import TheoryRenderer from "../../../(core)/components/theory/TheoryRenderer.tsx";
import Tag from "../../../(core)/components/Tag.jsx";
import BlogInteractions from "../../../(core)/components/blog/BlogInteractions.tsx";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import {
faClock,
faChevronRight,
faArrowLeft,
faArrowRight,
} from "@fortawesome/free-solid-svg-icons";
import Link from "next/link";
import Image from "next/image";

import {
getReadingTime,
getTitles,
Expand Down
Loading