Skip to content

Commit c75b0c1

Browse files
author
Egor Didenko
authored
Merge pull request #31 from uploadcare/react-uploader-example
feat(react-uploader): added react-uploader example via adapter
2 parents 87f6903 + 877ba74 commit c75b0c1

37 files changed

+7965
-0
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,13 @@ Each directory in this repository represents a different framework maintained by
2626

2727
* [JavaScript](./examples/js-uploader/)
2828
* [React](./examples/react-uploader/)
29+
* [React via Adapter](./examples/react-uploader-adapter/)
2930
* [Angular](./examples/angular-uploader/)
3031
* [Vue](./examples/vue-uploader/)
3132
* [Svelte](./examples/svelte-uploader/)
3233
* [Next.js](./examples/next-uploader/)
34+
* [Next.js via Adapter](./examples/next-uploader-adapter/)
35+
3336

3437
Each example provides a live demo, instructions to run it locally, and helpful tips right in the code.
3538

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"name": "Node.js",
3+
"image": "mcr.microsoft.com/devcontainers/javascript-node:18"
4+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
.DS_Store
12+
out
13+
dist
14+
dist-ssr
15+
coverage
16+
*.local
17+
18+
.next
19+
20+
# Editor directories and files
21+
.vscode/*
22+
!.vscode/extensions.json
23+
.idea
24+
*.suo
25+
*.ntvs*
26+
*.njsproj
27+
*.sln
28+
*.sw?
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<p align="center">
2+
<a href="https://uploadcare.com?ref=github-next-example-readme">
3+
<picture>
4+
<source media="(prefers-color-scheme: light)" srcset="https://ucarecdn.com/1b4714cd-53be-447b-bbde-e061f1e5a22f/logo-safespace-transparent.svg">
5+
<source media="(prefers-color-scheme: dark)" srcset="https://ucarecdn.com/3b610a0a-780c-4750-a8b4-3bf4a8c90389/logo-transparent-inverted.svg">
6+
<img width=250 alt="Uploadcare logo" src="https://ucarecdn.com/1b4714cd-53be-447b-bbde-e061f1e5a22f/logo-safespace-transparent.svg">
7+
</picture>
8+
</a>
9+
</p>
10+
<p align="center">
11+
<a href="https://uploadcare.com?ref=github-next-example-readme">Website</a> •
12+
<a href="https://uploadcare.com/docs/start/quickstart?ref=github-next-example-readme">Quick Start</a> •
13+
<a href="https://uploadcare.com/docs?ref=github-next-example-readme">Docs</a> •
14+
<a href="https://uploadcare.com/blog?ref=github-next-example-readme">Blog</a> •
15+
<a href="https://discord.gg/mKWRgRsVz8?ref=github-next-example-readme">Discord</a> •
16+
<a href="https://twitter.com/Uploadcare?ref=github-next-example-readme">Twitter</a>
17+
</p>
18+
19+
# Next.js File Uploader with Uploadcare Blocks
20+
21+
[![Edit next-uploader](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/github/uploadcare/blocks-examples/tree/main/examples/next-uploader-adapter/)
22+
23+
## Run this demo locally
24+
25+
```bash
26+
# clone this repo and go to the cloned folder
27+
28+
$ cd examples/next-uploader-adapter
29+
30+
$ npm install
31+
# or `yarn install`, if you wish
32+
33+
$ npm run start
34+
# or `yarn start`
35+
```
36+
37+
## Contribution
38+
39+
You’re always welcome to contribute:
40+
41+
* Create [issues](https://github.com/uploadcare/blocks-examples/issues) every time you feel something is missing or goes wrong.
42+
* Provide your feedback or drop us a support request at <a href="mailto:[email protected]">[email protected]</a>.
43+
* Ask questions on [Stack Overflow](https://stackoverflow.com/questions/tagged/uploadcare) with "uploadcare" tag if others can have these questions as well.
44+
* Star this repo if you like it ⭐️
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
const { PHASE_PRODUCTION_BUILD } = require('next/constants')
2+
3+
/**
4+
* @type {import('next').NextConfig}
5+
*/
6+
const nextConfig = {
7+
output: 'export',
8+
};
9+
10+
module.exports = (phase) => {
11+
if (phase === PHASE_PRODUCTION_BUILD) {
12+
return nextConfig;
13+
}
14+
15+
return {};
16+
}

0 commit comments

Comments
 (0)