-
Create a new short link by entering the long URL below
-
- {error}
-
-
-
-
-
-
- Click here
- {' '}
- to visit your dashboard.
-
-
- >
- );
-}
-
-export default CreateLink;
diff --git a/app/src/components/Dashboard.tsx b/app/src/components/Dashboard.tsx
index d699efb..913b566 100644
--- a/app/src/components/Dashboard.tsx
+++ b/app/src/components/Dashboard.tsx
@@ -1,4 +1,4 @@
-import React, { useState, useEffect } from 'react';
+import React, { useState, useEffect, FormEvent } from 'react';
import axios from 'axios';
import styles from '../styles/Dashboard.module.css';
import { useNavigate, Link } from 'react-router-dom';
@@ -28,6 +28,14 @@ function Dashboard() {
expire_date: string;
}
+ // Link creation states
+ const [link, setLink] = useState('');
+ const [url, setURL] = useState('');
+ const [isSubmitting, setIsSubmitting] = useState(false);
+ const [isCopied, setIsCopied] = useState(false);
+ const [error, setError] = useState