diff --git a/index.html b/index.html new file mode 100644 index 0000000..6412781 --- /dev/null +++ b/index.html @@ -0,0 +1,12 @@ + + + + + + React App + + +
+ + + \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..2dbb2fe --- /dev/null +++ b/package.json @@ -0,0 +1,9 @@ +{ + "name": "pending-requests-app", + "private": true, + "version": "0.1.0", + "type": "module", + "scripts": { "dev": "vite", "build": "vite build" }, + "dependencies": { "react": "^18.2.0", "react-dom": "^18.2.0" }, + "devDependencies": { "@vitejs/plugin-react": "^4.2.1", "vite": "^5.1.0" } +} \ No newline at end of file diff --git a/src/App.jsx b/src/App.jsx new file mode 100644 index 0000000..393fe1e --- /dev/null +++ b/src/App.jsx @@ -0,0 +1,26 @@ +import { useState } from 'react'; +export default function App() { + const [requests, setReqs] = useState([{id: 1, name: 'Sample Request'}]); + const style = { + app: { padding: '20px', fontFamily: 'system-ui', maxWidth: '600px', margin: '0 auto' }, + card: { border: '1px solid #ccc', padding: '15px', marginBottom: '10px', borderRadius: '8px' } + }; + return ( +
+

{{ $('Get Pending Requests').first().json.requests[0].app_name }}

+

{{ $('Get Pending Requests').first().json.requests[0].description }}

+
+ {requests.map(q => ( +
+ {q.name} + +
+ ))} +
+ +
+ ); +} \ No newline at end of file diff --git a/src/main.jsx b/src/main.jsx new file mode 100644 index 0000000..d91a819 --- /dev/null +++ b/src/main.jsx @@ -0,0 +1,9 @@ +import React from 'react'; +import ReactDOM from 'react-dom/client'; +import App from './App'; + +ReactDOM.createRoot(document.getElementById('root')).render( + + + +); \ No newline at end of file diff --git a/vite.config.js b/vite.config.js new file mode 100644 index 0000000..eec7352 --- /dev/null +++ b/vite.config.js @@ -0,0 +1,3 @@ +import { defineConfig } from 'vite'; +import react from '@vitejs/plugin-react'; +export default defineConfig({ plugins: [react()] }); \ No newline at end of file