Skip to content

Commit

Permalink
docs: Update TSS docs and example (#1016)
Browse files Browse the repository at this point in the history
Co-authored-by: Julius Marminge <[email protected]>
  • Loading branch information
juraj98 and juliusmarminge authored Oct 16, 2024
1 parent 426b461 commit b180bf1
Show file tree
Hide file tree
Showing 9 changed files with 1,385 additions and 5,126 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ export const { useUploadThing } = generateReactHelpers<UploadRouter>();
Include our CSS in your root route to make sure the components look right!

```tsx {{ title: "app/routes/__root.tsx" }}
// @ts-expect-error
import uploadthingCss from "@uploadthing/react/styles.css?url";

export const Route = createRootRoute({
Expand Down
2 changes: 1 addition & 1 deletion examples/minimal-expo/lib/trpc.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const resolveUrl = () => {
"/api/trpc",
typeof window.location !== "undefined"
? window.location.origin
: process.env.EXPO_PUBLIC_SERVER_ORIGIN ?? `http://${debuggerHost}`,
: (process.env.EXPO_PUBLIC_SERVER_ORIGIN ?? `http://${debuggerHost}`),
);
} catch (e) {
throw new Error(
Expand Down
1 change: 1 addition & 0 deletions examples/minimal-tanstack-start/app/client.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/// <reference types="vinxi/types/client" />
import { StartClient } from "@tanstack/start";
import { hydrateRoot } from "react-dom/client";

Expand Down
1 change: 0 additions & 1 deletion examples/minimal-tanstack-start/app/routes/__root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
} from "@tanstack/react-router";
import { Body, Head, Html, Meta, Scripts } from "@tanstack/start";

// @ts-expect-error
import uploadthingCss from "@uploadthing/react/styles.css?url";

export const Route = createRootRoute({
Expand Down
1 change: 1 addition & 0 deletions examples/minimal-tanstack-start/app/ssr.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/// <reference types="vinxi/types/server" />
import { getRouterManifest } from "@tanstack/start/router-manifest";
import {
createStartHandler,
Expand Down
8 changes: 4 additions & 4 deletions examples/minimal-tanstack-start/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
"start": "vinxi start"
},
"dependencies": {
"@tanstack/react-router": "^1.58.7",
"@tanstack/start": "^1.58.7",
"@uploadthing/react": "7.0.3",
"@tanstack/react-router": "^1.69.1",
"@tanstack/start": "^1.69.3",
"@uploadthing/react": "^7.0.3",
"react": "18.3.1",
"react-dom": "18.3.1",
"uploadthing": "7.1.0",
Expand All @@ -19,7 +19,7 @@
"devDependencies": {
"@types/react": "18.3.3",
"@types/react-dom": "18.3.0",
"@vitejs/plugin-react": "^4.3.1",
"@vitejs/plugin-react": "^4.3.2",
"typescript": "^5.5.2"
}
}
3 changes: 2 additions & 1 deletion examples/minimal-tanstack-start/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"moduleResolution": "Bundler",
"module": "ESNext",
"target": "ES2022",
"skipLibCheck": true
"skipLibCheck": true,
"strictNullChecks": true
}
}
2 changes: 1 addition & 1 deletion packages/expo/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const generateReactNativeHelpers = <TRouter extends FileRouter>(
initOpts?.url ?? "/api/uploadthing",
typeof window.location !== "undefined"
? window.location.origin
: process.env.EXPO_PUBLIC_SERVER_ORIGIN ?? `http://${debuggerHost}`,
: (process.env.EXPO_PUBLIC_SERVER_ORIGIN ?? `http://${debuggerHost}`),
);
} catch (e) {
// Can't throw since window.location is undefined in Metro pass
Expand Down
6,492 changes: 1,375 additions & 5,117 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

0 comments on commit b180bf1

Please sign in to comment.