-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bb0ca0d
commit b7eb16a
Showing
3 changed files
with
38 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import Link from 'next/link'; | ||
import dayjs from 'dayjs'; | ||
import Head from 'next/head'; | ||
import { useState } from 'react'; | ||
|
||
import styles from '../styles/blog.module.scss'; | ||
|
||
export default function AudioFeed() { | ||
let [link, setLink] = useState(""); | ||
|
||
async function handleSubmit(event) { | ||
event.preventDefault(); | ||
|
||
// so i can immediately clear the link var | ||
let tmp = link; | ||
setLink(''); | ||
|
||
const response = await fetch(`https://api.ethancedwards.com/audiofeed/v1?link=${tmp}`, { | ||
method: 'POST', | ||
}); | ||
} | ||
|
||
return ( | ||
<> | ||
<Head> | ||
<title>Ethan's Audio Feed</title> | ||
</Head> | ||
|
||
<form onSubmit={handleSubmit} method="POST"> | ||
<label for="link" className={styles.text}>Enter your address: </label> | ||
<input type="text" name="link" value={link} onChange={(e) => setLink(e.target.value)} required/> | ||
<input type="submit" value="Add Link" className={styles.submit} /> | ||
</form> | ||
</> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters