Skip to content

A one-of-a-kind resume builder that keeps your privacy in mind. Completely secure, customizable, portable, open-source and free forever. Try it out today!

remove dead code

Amruth Pillai547afaa18faa
diff --git a/knip.json b/knip.json
index 0de5de800..4cd9a4f15 100644
--- a/knip.json
+++ b/knip.json
@@ -1,6 +1,6 @@
{
"$schema": "https://unpkg.com/knip@5/schema.json",
- "entry": ["src/router.tsx"],
+ "entry": ["src/server.ts", "src/router.tsx"],
"tailwind": { "entry": ["src/styles.css"] },
"project": ["src/**/*.{js,jsx,ts,tsx,mdx,css}"],
"ignoreBinaries": ["mint"],
diff --git a/package.json b/package.json
index 0647573bc..a1d49bfd3 100644
--- a/package.json
+++ b/package.json
@@ -90,7 +90,6 @@
"input-otp": "^1.4.2",
"js-cookie": "^3.0.5",
"jsonrepair": "^3.13.3",
- "lucide-react": "^0.577.0",
"monaco-editor": "^0.55.1",
"motion": "^12.38.0",
"nodemailer": "^8.0.2",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 7e690b579..e10921440 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -198,9 +198,6 @@ importers:
jsonrepair:
specifier: ^3.13.3
version: 3.13.3
- lucide-react:
- specifier: ^0.577.0
- version: 0.577.0([email protected])
monaco-editor:
specifier: ^0.55.1
version: 0.55.1
@@ -5660,11 +5657,6 @@ packages:
resolution: {integrity: sha512-DqC6n3QQ77zdFpCMASA1a3Jlb64Hv2N2DciFGkO/4L9+q/IpIAuRlKOvCXabtRW6cQf8usbmM6BE/TOPysCdIA==}
engines: {bun: '>=1.0.0', deno: '>=1.30.0', node: '>=8.0.0'}
- resolution: {integrity: sha512-4LjoFv2eEPwYDPg/CUdBJQSDfPyzXCRrVW1X7jrx/trgxnxkHFjnVZINbzvzxjN70dxychOfg+FTYwBiS3pQ5A==}
- peerDependencies:
- react: ^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0
-
resolution: {integrity: sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==}
@@ -13391,10 +13383,6 @@ snapshots:
optional: true
- dependencies:
- react: 19.2.4
-
dependencies:
sourcemap-codec: 1.4.8
diff --git a/src/hooks/use-data-state.tsx b/src/hooks/use-data-state.tsx
deleted file mode 100644
index dba6c05a3..000000000
--- a/src/hooks/use-data-state.tsx
+++ /dev/null
@@ -1,52 +0,0 @@
-import * as React from "react";
-
-type DataStateValue = string | boolean | null;
-
-function parseDatasetValue(value: string | null): DataStateValue {
- if (value === null) return null;
- if (value === "" || value === "true") return true;
- if (value === "false") return false;
- return value;
-}
-
-function useDataState<T extends HTMLElement = HTMLElement>(
- key: string,
- forwardedRef?: React.Ref<T | null>,
- onChange?: (value: DataStateValue) => void,
-): [DataStateValue, React.RefObject<T | null>] {
- const localRef = React.useRef<T | null>(null);
- React.useImperativeHandle(forwardedRef, () => localRef.current as T);
-
- const getSnapshot = (): DataStateValue => {
- const el = localRef.current;
- return el ? parseDatasetValue(el.getAttribute(`data-${key}`)) : null;
- };
-
- const subscribe = (callback: () => void) => {
- const el = localRef.current;
- if (!el) return () => {};
- const observer = new MutationObserver((records) => {
- for (const record of records) {
- if (record.attributeName === `data-${key}`) {
- callback();
- break;
- }
- }
- });
- observer.observe(el, {
- attributes: true,
- attributeFilter: [`data-${key}`],
- });
- return () => observer.disconnect();
- };
-
- const value = React.useSyncExternalStore(subscribe, getSnapshot);
-
- React.useEffect(() => {
- if (onChange) onChange(value);
- }, [value, onChange]);
-
- return [value, localRef];
-}
-
-export { useDataState };
diff --git a/src/utils/get-strict-context.tsx b/src/utils/get-strict-context.tsx
deleted file mode 100644
index e0c827417..000000000
--- a/src/utils/get-strict-context.tsx
+++ /dev/null
@@ -1,23 +0,0 @@
-import * as React from "react";
-
-function getStrictContext<T>(
- name?: string,
-): readonly [({ value, children }: { value: T; children?: React.ReactNode }) => React.JSX.Element, () => T] {
- const Context = React.createContext<T | undefined>(undefined);
-
- const Provider = ({ value, children }: { value: T; children?: React.ReactNode }) => (
- <Context.Provider value={value}>{children}</Context.Provider>
- );
-
- const useSafeContext = () => {
- const ctx = React.useContext(Context);
- if (ctx === undefined) {
- throw new Error(`useContext must be used within ${name ?? "a Provider"}`);
- }
- return ctx;
- };
-
- return [Provider, useSafeContext] as const;
-}
-
-export { getStrictContext };