32username: tweet.user.screen_name,
33name: tweet.user.name,
34profile_image: tweet.user.profile_image_url_https,
35media: tweet.entities?.media?.[0]?.media_url_https,
36}));
socialDataUpdatemain.tsx3 matches
1// This val fetches recent tweets about @SnapAR or Lens Studio, removes duplicates,
2// and displays them as embedded tweets with preview images on a dark background.
3// Updated to use Social Data instead of Twitter API
467// This val fetches recent social media posts about @SnapAR or Lens Studio using socialDataSearch,
8// and displays them as embedded posts with preview images on a dark background.
910export default async function server(request: Request): Promise<Response> {
35username: tweet.user.screen_name,
36name: tweet.user.name,
37profile_image: tweet.user.profile_image_url_https,
38media: tweet.entities?.media?.[0]?.media_url_https,
39}));
blob_adminREADME.md1 match
3This is a lightweight Blob Admin interface to view and debug your Blob data.
45
67Use this button to install the val:
sqliteExplorerAppREADME.md1 match
3View and interact with your Val Town SQLite data. It's based off Steve's excellent [SQLite Admin](https://www.val.town/v/stevekrouse/sqlite_admin?v=46) val, adding the ability to run SQLite queries directly in the interface. This new version has a revised UI and that's heavily inspired by [LibSQL Studio](https://github.com/invisal/libsql-studio) by [invisal](https://github.com/invisal). This is now more an SPA, with tables, queries and results showing up on the same page.
45
67## Install
92appName: 'ValPush',
93appIconUrl: '${iconURL}',
94assetUrl: 'https://cdn.jsdelivr.net/gh/philfung/add-to-homescreen@1.9/dist/assets/img/', // Link to directory of library image assets.
95maxModalDisplayCount: -1
96});
3View and interact with your Val Town SQLite data. It's based off Steve's excellent [SQLite Admin](https://www.val.town/v/stevekrouse/sqlite_admin?v=46) val, adding the ability to run SQLite queries directly in the interface. This new version has a revised UI and that's heavily inspired by [LibSQL Studio](https://github.com/invisal/libsql-studio) by [invisal](https://github.com/invisal). This is now more an SPA, with tables, queries and results showing up on the same page.
45
67## Install
23- `node-emoji` [github here](https://github.com/omnidan/node-emoji) - replaces all emojis with spans
4- emoji images for replacement are hosted at netlify (sourced from private repo)
1export async function replaceEmojisWithImages(
2req: express.Request,
3res: express.Response,
generateRAdioDjRssmain.tsx2 matches
5export const generateRAdioDjRss = async () => {
6const rssItems = previousDjs.map((dj) => {
7const djImgSrc = `https://r-a-d.io/api/dj-image/${
8encodeURIComponent(
9dj.djimage,
10)
11}`
hiraganaWordBuildermain.tsx18 matches
60const [isComplete, setIsComplete] = useState(false);
61const [inputStatus, setInputStatus] = useState([]);
62const [imageData, setImageData] = useState("");
63const [isLoading, setIsLoading] = useState(false);
64const [isTransitioning, setIsTransitioning] = useState(false);
88};
8990const fetchImage = async (romaji) => {
91setIsLoading(true);
92try {
93const response = await fetch(`/api/image/${romaji}`);
94if (!response.ok) {
95throw new Error("Failed to fetch image");
96}
97const data = await response.json();
98if (data && data.image) {
99const dataUrl = `data:image/png;base64,${data.image}`;
100setImageData(dataUrl);
101} else {
102throw new Error("Invalid image data received");
103}
104} catch (error) {
105console.error("Error fetching image:", error);
106setImageData("");
107} finally {
108setIsLoading(false);
119setInputStatus([]);
120setIsComplete(false);
121fetchImage(newWord.romaji);
122setIsTransitioning(false);
123}, 300);
178</div>
179)
180: imageData
181? <img src={imageData} alt="Vocabulary word" className="w-40 h-40 object-cover rounded-lg shadow-md" />
182: (
183<div className="w-40 h-40 flex items-center justify-center bg-gray-200 rounded-lg">
184<span className="text-gray-500">No image available</span>
185</div>
186)}
264const url = new URL(request.url);
265266if (url.pathname.startsWith("/api/image/")) {
267const romaji = url.pathname.split("/").pop();
268try {
269// This is a placeholder for the actual image retrieval from Val Town blob storage
270// You'll need to implement the actual retrieval logic here
271const vocabularyJson = await blob.getJSON(romaji);
275});
276} catch (error) {
277console.error("Error fetching image:", error);
278return new Response("Image not found", { status: 404 });
279}
280}