Skip to content

Docs: Fix ESLint dependency pin #198

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from
Closed
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
21 changes: 9 additions & 12 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,15 @@
"react": "^18",
"react-dom": "^18",
"react-icons": "^5.2.1",
"tailwind-merge": "^2.4.0"
"tailwind-merge": "^2.4.0",
"tailwindcss": "v3"
},
"type": "module",
"devDependencies": {
"@types/node": "^22.0.0",
"@types/react": "^18",
"@types/react-dom": "^18",
"eslint": "^9.8.0",
"eslint-config-next": "14.2.5",
"pagefind": "^1.1.0",
"postcss": "^8.4.40",
"tailwindcss": "^3.4.7",
"typescript": "^5.5.4"
},
"type": "module"
"@types/node": "24.0.0",
"@types/react": "19.1.7",
"eslint": "^9.28.0",
"pagefind": "^1.3.0",
"typescript": "5.8.3"
}
}
4 changes: 2 additions & 2 deletions docs/src/components/animated-modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export const ModalBody = ({
}
}, [open]);

const modalRef = useRef(null);
const modalRef = useRef<HTMLDivElement>(null);
const { setOpen } = useModal();
useOutsideClick(modalRef, () => setOpen(false));

Expand Down Expand Up @@ -220,7 +220,7 @@ const CloseIcon = () => {
// Hook to detect clicks outside of a component.
// Add it in a separate file, I've added here for simplicity
export const useOutsideClick = (
ref: React.RefObject<HTMLDivElement>,
ref: React.RefObject<HTMLDivElement | null>,
callback: Function
) => {
useEffect(() => {
Expand Down
4 changes: 2 additions & 2 deletions docs/src/components/stars-background.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export const StarsBackground: React.FC<StarsBackgroundProps> = ({
className,
}) => {
const [stars, setStars] = useState<StarProps[]>([]);
const containerRef: RefObject<HTMLDivElement> =
const containerRef: RefObject<HTMLDivElement | null> =
useRef<HTMLDivElement>(null);

const generateStars = useCallback(
Expand All @@ -70,7 +70,7 @@ export const StarsBackground: React.FC<StarsBackgroundProps> = ({
opacity: Math.random() * 0.5 + 0.5,
twinkleSpeed: shouldTwinkle
? minTwinkleSpeed +
Math.random() * (maxTwinkleSpeed - minTwinkleSpeed)
Math.random() * (maxTwinkleSpeed - minTwinkleSpeed)
: null,
};
});
Expand Down
Loading