Skip to content

Commit

Permalink
Enable vercel deployment for react
Browse files Browse the repository at this point in the history
  • Loading branch information
incorbador committed Nov 25, 2023
1 parent 64c02d6 commit 373aa59
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 5 deletions.
1 change: 1 addition & 0 deletions playground/react-example/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
REACT_APP_CORBADO_PROJECT_ID=pro-503401103218055321
1 change: 1 addition & 0 deletions playground/react-example/.env.production
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
REACT_APP_CORBADO_PROJECT_ID=pro-3652881945085154854
1 change: 1 addition & 0 deletions playground/react-example/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ node_modules
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.vercel
2 changes: 1 addition & 1 deletion playground/react-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"build": "REACT_APP_ENV=production react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
Expand Down
8 changes: 4 additions & 4 deletions playground/react-example/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import './App.css';
import { CorbadoProvider } from '@corbado/react-sdk';
import {CorbadoProvider} from '@corbado/react-sdk';
import RouteProvider from './routes';

function App() {
return (
<div
className='App'
style={{ display: 'flex', alignItems: 'center', justifyContent: 'center', height: '100dvh' }}
style={{display: 'flex', alignItems: 'center', justifyContent: 'center', height: '100dvh'}}
>
<CorbadoProvider projectId='pro-503401103218055321'>
<RouteProvider />
<CorbadoProvider projectId={process.env.REACT_APP_CORBADO_PROJECT_ID!}>
<RouteProvider/>
</CorbadoProvider>
</div>
);
Expand Down
8 changes: 8 additions & 0 deletions playground/react-example/vercel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"rewrites": [
{
"source": "/(.*)",
"destination": "/index.html"
}
]
}
8 changes: 8 additions & 0 deletions playground/react-sdk-example/vercel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"rewrites": [
{
"source": "/(.*)",
"destination": "/index.html"
}
]
}

0 comments on commit 373aa59

Please sign in to comment.