18
19/**
20 * General use function to commit files to GitHub
21 */
22export async function commitFiles({
23 token,
24 owner,
12}
13
14function App() {
15 const [expenses, setExpenses] = useState<Expense[]>([]);
16 const [description, setDescription] = useState("");
23 }, []);
24
25 // Function to fetch expenses from server
26 const fetchExpenses = async () => {
27 try {
34 };
35
36 // Function to add a new expense
37 const addExpense = async (e: React.FormEvent) => {
38 e.preventDefault();
132}
133
134function client() {
135 createRoot(document.getElementById("root")).render(<App />);
136}
137if (typeof document !== "undefined") { client(); }
138
139export default async function server(request: Request): Promise<Response> {
140 // Dynamic import of SQLite to avoid browser-side errors
141 const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
1import { getWeather } from "https://esm.town/v/stevekrouse/getWeather";
2
3export default async function(interval: Interval) {
4 let weather = await getWeather("Nairobi, Kenya");
5 console.log(weather.current_condition[0].FeelsLikeF);
7import { getWeather } from "https://esm.town/v/stevekrouse/getWeather";
8
9export default async function (interval: Interval) {
10 let weather = await getWeather("Nairobi, Kenya");
11 let feelsLike = weather.current_condition[0].FeelsLikeF;
1import { getWeather } from "https://esm.town/v/stevekrouse/getWeather";
2export default async function (interval: Interval) {
3 let weather = await getWeather("Brooklyn, NY");
4 console.log(weather.current_condition[0].FeelsLikeF);
1export default async function (interval: Interval) {
2
3}
12}
13
14function App() {
15 const [activities, setActivities] = useState<ClosingActivity[]>([]);
16 const [newActivity, setNewActivity] = useState<Partial<ClosingActivity>>({
134}
135
136function client() {
137 createRoot(document.getElementById("root")).render(<App />);
138}
139if (typeof document !== "undefined") { client(); }
140
141export default async function server(request: Request): Promise<Response> {
142 const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
143 const KEY = "determinedBrownOcelot";
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
4
5function App() {
6 const [assignments, setAssignments] = useState([]);
7 const [messages, setMessages] = useState([]);
279};
280
281function client() {
282 createRoot(document.getElementById("root")).render(<App />);
283}
284if (typeof document !== "undefined") { client(); }
285
286export default async function server(request: Request): Promise<Response> {
287 const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
288 const { blob } = await import("https://esm.town/v/std/blob");
46- Key: `mentionsDiscord`
47- Value: Your Discord webhook URL.
48Notifications will be sent using this function:
49
50```ts
63
64- **Proxies via Val Town's [SocialDataProxy](https://www.val.town/v/stevekrouse/socialDataProxy)**: Limited to 10 cents per day for [**Val Town Pro users**](https://www.val.town/pricing). This API is *only* for Pro users.
65- **Need more calls?** Sign up for your own [SocialData API token](https://socialdata.tools) and configure the [`socialDataSearch`](https://www.val.town/v/stevekrouse/socialDataSearch) function.
12const isProd = false;
13
14export async function twitterAlert({ lastRunAt }: Interval) {
15 // If isProd, search for tweets since that last time this interval ran
16 // if not, search for tweets since 48 hours ago for testing
1export default async function (req: Request): Promise<Response> {
2 return Response.json({ ok: true })
3}
9import Contact from "./Contact";
10
11export default function App() {
12 return (
13 <Router>