Skip to content
Merged
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
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ dist
/coverage

# production
/build
/dist

# misc
.DS_Store
Expand All @@ -128,3 +128,4 @@ yarn-error.log*

.npmrc
index.generated.css
.wrangler
3 changes: 3 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
yarn run test
yarn run lint
yarn lint-staged
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ See the section about [running tests](https://facebook.github.io/create-react-ap

### `npm run build`

Builds the app for production to the `build` folder.\
Builds the app for production to the `dist` folder.\
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.\
The build is minified and obfuscated, and the filenames include the hashes.\
Your app is ready to be deployed!

See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
Expand Down
5 changes: 5 additions & 0 deletions cloudflare/worker.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export default {
async fetch(request, env) {
return env.ASSETS.fetch(request);
},
} satisfies ExportedHandler<Env>;
2 changes: 1 addition & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import eslintConfigInternxt from '@internxt/eslint-config-internxt';

export default [
{
ignores: ['build', 'coverage', 'node_modules'],
ignores: ['dist', 'coverage', 'node_modules'],
},
...eslintConfigInternxt,
];
19 changes: 12 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,17 @@
"add:npmrc": "cp .npmrc.template .npmrc",
"vercel:install": "yarn run add:npmrc && yarn install",
"lint": "eslint .",
"pretty": "prettier --write **/*.{js,jsx,tsx,ts}"
"pretty": "prettier --write **/*.{js,jsx,tsx,ts}",
"prepare": "husky",
"cloudflare:dev": "yarn build && wrangler dev"
},
"dependencies": {
"@headlessui/react": "2.2.9",
"@internxt/lib": "1.3.1",
"@internxt/sdk": "1.11.12",
"@sentry/react": "10.22.0",
"async": "3.2.6",
"axios": "1.13.0",
"axios": "1.13.1",
"bip39": "3.1.0",
"browserify-zlib": "0.2.0",
"buffer": "6.0.3",
Expand All @@ -42,7 +44,7 @@
"react-dropzone": "14.3.8",
"react-hot-toast": "2.6.0",
"react-markdown": "10.1.0",
"react-router-dom": "7.9.4",
"react-router-dom": "7.9.5",
"stream-browserify": "3.0.0",
"stream-http": "3.2.0",
"streamsaver": "2.0.6",
Expand All @@ -65,22 +67,24 @@
]
},
"devDependencies": {
"@cloudflare/vite-plugin": "1.13.17",
"@internxt/eslint-config-internxt": "2.0.1",
"@internxt/prettier-config": "internxt/prettier-config#v1.0.2",
"@rollup/plugin-replace": "6.0.2",
"@rollup/plugin-replace": "6.0.3",
"@tailwindcss/vite": "4.1.16",
"@testing-library/jest-dom": "6.9.1",
"@types/async": "3.2.25",
"@types/lodash.throttle": "4.1.9",
"@types/node": "24.9.1",
"@types/node": "24.9.2",
"@types/react": "19.2.2",
"@types/react-dom": "19.2.2",
"@types/streamsaver": "2.0.5",
"@vitejs/plugin-react": "5.1.0",
"@vitest/coverage-istanbul": "4.0.4",
"@vitest/coverage-istanbul": "4.0.5",
"autoprefixer": "10.4.21",
"dotenv": "17.2.3",
"eslint": "9.38.0",
"husky": "9.1.7",
"jsdom": "27.0.1",
"lint-staged": "16.2.6",
"postcss": "8.5.6",
Expand All @@ -90,7 +94,8 @@
"vite-plugin-bundle-obfuscator": "1.8.0",
"vite-plugin-node-polyfills": "0.24.0",
"vite-plugin-svgr": "4.5.0",
"vitest": "4.0.4"
"vitest": "4.0.5",
"wrangler": "4.45.2"
},
"lint-staged": {
"*.{js,jsx,tsx,ts}": [
Expand Down
17 changes: 8 additions & 9 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
import { Toaster } from "react-hot-toast";
import { BrowserRouter, Navigate, Route, Routes, useParams, useSearchParams } from "react-router-dom";
import RootDropzone from "./components/RootDropzone";
import { FilesProvider } from "./contexts/Files";
import DownloadView from "./views/DownloadView";
import HomeView from "./views/HomeView";
import NotFoundView from "./views/NotFoundView";

import { Toaster } from 'react-hot-toast';
import { BrowserRouter, Navigate, Route, Routes, useParams, useSearchParams } from 'react-router-dom';
import RootDropzone from './components/RootDropzone';
import { FilesProvider } from './contexts/Files';
import DownloadView from './views/DownloadView';
import HomeView from './views/HomeView';
import NotFoundView from './views/NotFoundView';

function DownloadRedirectWrapper() {
const { sendId } = useParams();
const [searchParams] = useSearchParams();
const code = searchParams.get("code") ?? '';
const code = searchParams.get('code') ?? '';

return <Navigate to={`/d/${sendId}/${code}`} replace />;
}
Expand Down
Loading