Replace vendored twui library with @moduletrace/twui package
- Import all twui layout/elements components and base.css from the @moduletrace/twui package instead of src/components/lib - Move the site's own motion and three modules out of the old lib folder into src/components/motion and src/components/three - Delete the vendored src/components/lib folder and its tsconfig excludes - Type BlogPostsListCard's post prop with the DB blog post type, fixing the type error in BlogPostsList Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import React from "react";
|
||||
|
||||
/** Boot the site-wide GSAP motion system (see ./motion.ts). */
|
||||
export default function useMotion() {
|
||||
React.useEffect(() => {
|
||||
let destroy: (() => void) | undefined;
|
||||
let cancelled = false;
|
||||
import("./motion").then(({ initMotion }) => {
|
||||
if (!cancelled) destroy = initMotion();
|
||||
});
|
||||
return () => {
|
||||
cancelled = true;
|
||||
destroy?.();
|
||||
};
|
||||
}, []);
|
||||
}
|
||||
Reference in New Issue
Block a user