diff --git a/README.md b/README.md index 4f4e202..578ccd7 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,6 @@ -# React + Vite +# textsender -This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules. - -Currently, two official plugins are available: - -- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Babel](https://babeljs.io/) for Fast Refresh -- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh - -## Expanding the ESLint configuration - -If you are developing a production application, we recommend using TypeScript with type-aware lint rules enabled. Check out the [TS template](https://github.com/vitejs/vite/tree/main/packages/create-vite/template-react-ts) for information on how to integrate TypeScript and [`typescript-eslint`](https://typescript-eslint.io) in your project. +Frontend web app used to send messages # Getting started diff --git a/index.html b/index.html index 0c589ec..0d3cc0b 100644 --- a/index.html +++ b/index.html @@ -2,9 +2,8 @@ - - Vite + React + textsender
diff --git a/package-lock.json b/package-lock.json index d21f5d5..0db7709 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "textsender", - "version": "0.0.9", + "version": "0.0.10", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "textsender", - "version": "0.0.9", + "version": "0.0.10", "dependencies": { "dotenv": "^17.4.2", "react": "^19.2.7", diff --git a/package.json b/package.json index 67201f5..7618647 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "textsender", "private": true, - "version": "0.0.9", + "version": "0.0.10", "type": "module", "scripts": { "dev": "vite", diff --git a/public/.empty b/public/.empty new file mode 100644 index 0000000..e69de29 diff --git a/public/vite.svg b/public/vite.svg deleted file mode 100644 index e7b8dfb..0000000 --- a/public/vite.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/api/scheduleApi.js b/src/api/scheduleApi.js index dd6630e..4d4aac7 100644 --- a/src/api/scheduleApi.js +++ b/src/api/scheduleApi.js @@ -20,6 +20,25 @@ export const scheduleApi = { } }, + getScheduledMessage: async (userId, authBearerToken) => { + const response = await fetch( + `${API_BASE_URL}/api/v1/schedule/message?user_id=${userId}`, + { + method: 'GET', + headers: { + 'Content-Type': 'application/json', + Authorization: authBearerToken, + }, + } + ); + + if (!response.ok) { + throw new Error('Error getting scheduled message'); + } else { + return response.json(); + } + }, + prepareMessage: async (reqBody, authBearerToken) => { console.log('Preparing Scheduled message'); diff --git a/src/components/Dashboard.jsx b/src/components/Dashboard.jsx index 1a44675..442930b 100644 --- a/src/components/Dashboard.jsx +++ b/src/components/Dashboard.jsx @@ -8,6 +8,8 @@ import './Dashboard.css'; import SendMessageWizardModal from './SendMessageWizard/SendMessageWizardModal'; import ViewContactWizardModal from './ViewContactWizard/ViewContactWizardModal'; +import { APP_NAME } from '../constants/app'; + const Dashboard = () => { const navigate = useNavigate(); const [activeView, setActiveView] = useState('dashboard'); @@ -53,7 +55,7 @@ const Dashboard = () => { {/* Navbar */}