EEPPortalnewsArticle.tsx6 matches
388);
389// Main Component for the News Article (Contents) Tab
390export function NewsArticleTab({ user }: { user: CurrentUser | null }) {
391const [articles, setArticles] = useState<Article[]>([]);
392const [title, setTitle] = useState("");
580}
581};
582// Function to open the edit modal - Similar pattern to MediaMonitoringTab
583const handleEditClick = (article: Article) => {
584setEditFormData({
598setEditModalError(""); // Clear modal-specific error
599};
600// Function to close the edit modal - Similar pattern to MediaMonitoringTab
601const handleCloseEditModal = () => {
602setIsEditModalOpen(false);
615setEditModalError(""); // Clear modal-specific error on close
616};
617// Function to handle changes in the edit modal form - Similar pattern to MediaMonitoringTab
618const handleEditFormChange = (e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement>) => {
619const { name, value } = e.target;
623}));
624};
625// Function to save the edited entry
626const handleSaveEdit = async () => {
627// Validate required fields from editFormData
682}
683};
684// Function to clear all filters
685const clearFilters = () => {
686setTitleFilter("");
138color: BRAND_COLORS.darkGreen,
139marginBottom: "10px",
140cursor: "pointer", // Added for toggle functionality
141},
142commentItem: {
247}
248249export function FeedsTab(
250{ user, onNavigateToNewsArticleTab }: { user: CurrentUser | null; onNavigateToNewsArticleTab: () => void },
251) {
MindfulMilescada_hora.ts2 matches
1function sendNotification() {
2const TOKEN = process.env.TELEGRAM_BOT_TOKEN;
3const CHAT_ID = 1825527066;
26* Главная функция cron-триггера
27*/
28export default async function() {
29sendNotification();
30}
ValTownValdemo.ts1 match
5.withFile(
6"src/index.ts",
7`export function main() { console.log("Hello, ValTown!"); }`,
8"script",
9)
eschooldataClonemain.tsx3 matches
3import React, { useEffect, useState } from "https://esm.sh/react@18.2.0";
45function App() {
6const [view, setView] = useState("students");
7const [students, setStudents] = useState([]);
428}
429430function client() {
431createRoot(document.getElementById("root")).render(<App />);
432}
433if (typeof document !== "undefined") { client(); }
434435export default async function server(request: Request): Promise<Response> {
436const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
437const KEY = "eschooldataClone";
parquetbranch-count-analysis.html2 matches
74import * as duckdb from "https://esm.sh/@duckdb/duckdb-wasm";
7576async function initDuckDB() {
77try {
78const JSDELIVR_BUNDLES = duckdb.getJsDelivrBundles();
104}
105106async function countBranches() {
107document.getElementById("loading").style.display = "block";
108document.getElementById("count-display").style.display = "none";
openHeartProtocolGET.tsx1 match
1// Receive emojis!
23export default async function send() {
4const urls = [
5"https://openheart.val.run/charmaineklee.com/OpenHeart",
58import * as duckdb from "https://esm.sh/@duckdb/duckdb-wasm";
5960async function initDuckDB() {
61try {
62const JSDELIVR_BUNDLES = duckdb.getJsDelivrBundles();
parquetuser-analytics-dashboard.html13 matches
210211// Initialize DuckDB
212async function initDuckDB() {
213const JSDELIVR_BUNDLES = duckdb.getJsDelivrBundles();
214const bundle = await duckdb.selectBundle(JSDELIVR_BUNDLES);
238239// Initialize the dashboard
240async function initDashboard() {
241try {
242conn = await initDuckDB();
253document.getElementById("timeRange").addEventListener(
254"change",
255function () {
256timeRange = this.value;
257currentPage = 1;
263document.getElementById("tierFilter").addEventListener(
264"change",
265function () {
266tierFilter = this.value;
267currentPage = 1;
272document.getElementById("prevPage").addEventListener(
273"click",
274function () {
275if (currentPage > 1) {
276currentPage--;
282document.getElementById("nextPage").addEventListener(
283"click",
284function () {
285if (currentPage * pageSize < totalUsers) {
286currentPage++;
298299// Load user table with pagination
300async function loadUserTable() {
301try {
302document.getElementById("tableLoading").style.display =
384385// Load user growth chart
386async function loadUserGrowthChart() {
387try {
388document.getElementById("userGrowthLoading").style.display =
518519// Load user tiers chart
520async function loadUserTiersChart() {
521try {
522document.getElementById("userTiersLoading").style.display =
591592// Load theme preferences chart
593async function loadThemeChart() {
594try {
595document.getElementById("themeLoading").style.display =
663664// Load copilot usage chart
665async function loadCopilotChart() {
666try {
667document.getElementById("copilotLoading").style.display =
737738// Load referral sources chart
739async function loadReferralChart() {
740try {
741document.getElementById("referralLoading").style.display =
816817// Populate tier filter options
818async function populateTierOptions() {
819try {
820const result = await conn.query(`
Teamcontrollers.ts6 matches
10const vt = new ValTown();
1112export async function getValsForUser(id: string) {
13try {
14const vals = await vt.vals.list({ user_id: id });
20}
2122export async function getDatabasePageIds() {
23try {
24const response = await notion.databases.query({
31}
3233export async function getTeam() {
34try {
35const response = await notion.databases.query({
55}
5657export async function getValTownUser(username: string) {
58try {
59return await vt.alias.username.retrieve(username);
63}
6465export async function getNotionPage(id: string) {
66try {
67return await notion.pages.retrieve({
73}
7475export async function setNotionPage(id: string, data: any) {
76// bio might be empty (optional field)
77const bio = data.bio