-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixing EMFILE issue by removing react-simple-icons (#10)
- Loading branch information
Showing
16 changed files
with
116 additions
and
7,339 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import { | ||
createStartAPIHandler, | ||
defaultAPIFileRouteHandler, | ||
} from '@tanstack/start/api' | ||
} from "@tanstack/start/api"; | ||
|
||
export default createStartAPIHandler(defaultAPIFileRouteHandler) | ||
export default createStartAPIHandler(defaultAPIFileRouteHandler); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
import { StartClient } from "@tanstack/start"; | ||
/// <reference types="vinxi/types/client" /> | ||
import { hydrateRoot } from 'react-dom/client' | ||
import { StartClient } from '@tanstack/start' | ||
import { createRouter } from './router' | ||
import { hydrateRoot } from "react-dom/client"; | ||
import { createRouter } from "./router"; | ||
|
||
const router = createRouter() | ||
const router = createRouter(); | ||
|
||
hydrateRoot(document, <StartClient router={router} />) | ||
hydrateRoot(document, <StartClient router={router} />); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,26 @@ | ||
import { Link } from '@tanstack/react-router' | ||
import { Link } from "@tanstack/react-router"; | ||
|
||
export function NotFound({ children }: { children?: any }) { | ||
return ( | ||
<div className="space-y-2 p-2"> | ||
<div className="text-gray-600 dark:text-gray-400"> | ||
{children || <p>The page you are looking for does not exist.</p>} | ||
</div> | ||
<p className="flex items-center gap-2 flex-wrap"> | ||
<p className="flex flex-wrap items-center gap-2"> | ||
<button | ||
type="button" | ||
onClick={() => window.history.back()} | ||
className="bg-emerald-500 text-white px-2 py-1 rounded uppercase font-black text-sm" | ||
className="rounded bg-emerald-500 px-2 py-1 font-black text-sm text-white uppercase" | ||
> | ||
Go back | ||
</button> | ||
<Link | ||
to="/" | ||
className="bg-cyan-600 text-white px-2 py-1 rounded uppercase font-black text-sm" | ||
className="rounded bg-cyan-600 px-2 py-1 font-black text-sm text-white uppercase" | ||
> | ||
Start Over | ||
</Link> | ||
</p> | ||
</div> | ||
) | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { type ComponentPropsWithoutRef, forwardRef } from "react"; | ||
import { | ||
siApple, | ||
siFirefoxbrowser, | ||
siGithub, | ||
siGooglechrome, | ||
siLinux, | ||
type SimpleIcon, | ||
} from "simple-icons"; | ||
|
||
function generateIcon(icon: SimpleIcon) { | ||
return forwardRef<SVGSVGElement, ComponentPropsWithoutRef<"svg">>( | ||
(props, ref) => { | ||
return ( | ||
<svg | ||
xmlns="http://www.w3.org/2000/svg" | ||
viewBox="0 0 24 24" | ||
ref={ref} | ||
fill="currentColor" | ||
{...props} | ||
> | ||
<title>{icon.title}</title> | ||
<path d={icon.path} /> | ||
</svg> | ||
); | ||
}, | ||
); | ||
} | ||
|
||
export const GithubIcon = generateIcon(siGithub); | ||
export const AppleIcon = generateIcon(siApple); | ||
export const LinuxIcon = generateIcon(siLinux); | ||
export const FirefoxIcon = generateIcon(siFirefoxbrowser); | ||
export const GoogleChromeIcon = generateIcon(siGooglechrome); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
import { createRouter as createTanStackRouter } from '@tanstack/react-router' | ||
import { routeTree } from './routeTree.gen' | ||
import { DefaultCatchBoundary } from './components/DefaultCatchBoundary' | ||
import { NotFound } from './components/NotFound' | ||
import { createRouter as createTanStackRouter } from "@tanstack/react-router"; | ||
import { DefaultCatchBoundary } from "./components/DefaultCatchBoundary"; | ||
import { NotFound } from "./components/NotFound"; | ||
import { routeTree } from "./routeTree.gen"; | ||
|
||
export function createRouter() { | ||
const router = createTanStackRouter({ | ||
routeTree, | ||
defaultPreload: 'intent', | ||
defaultPreload: "intent", | ||
defaultErrorComponent: DefaultCatchBoundary, | ||
defaultNotFoundComponent: () => <NotFound />, | ||
scrollRestoration: true, | ||
}) | ||
}); | ||
|
||
return router | ||
return router; | ||
} | ||
|
||
declare module '@tanstack/react-router' { | ||
declare module "@tanstack/react-router" { | ||
interface Register { | ||
router: ReturnType<typeof createRouter> | ||
router: ReturnType<typeof createRouter>; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
import { getRouterManifest } from "@tanstack/start/router-manifest"; | ||
/// <reference types="vinxi/types/server" /> | ||
import { | ||
createStartHandler, | ||
defaultStreamHandler, | ||
} from '@tanstack/start/server' | ||
import { getRouterManifest } from '@tanstack/start/router-manifest' | ||
} from "@tanstack/start/server"; | ||
|
||
import { createRouter } from './router' | ||
import { createRouter } from "./router"; | ||
|
||
export default createStartHandler({ | ||
createRouter, | ||
getRouterManifest, | ||
})(defaultStreamHandler) | ||
})(defaultStreamHandler); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.