ThatAIguyA world of ideas

THE CONSCIOUSNESS ATLAS
Read. Experiment. Follow the evidence.

ConsciousnessLearn · Explore · Joseph Anady

Janady13/llms-txt-hub / apps/web/hooks/use-websites.ts

Source identity, revision, and recovered contents.

GitHub sourceSource text recovered

Source identity

FieldRecorded value
Source typeGitHub source
Original recordJanady13/llms-txt-hub / apps/web/hooks/use-websites.ts
DateNot specified in source
RepositoryJanady13/llms-txt-hub
Revisione0f4bf978d4df168369c7601d9c5f5ea89e84377
Branchmain
Path or archive memberapps/web/hooks/use-websites.ts
Original SHA-25688f7d240b39a7de20ab951b5e687ee209098463840bcfbb48cacc7e0006d81a1
Git blob SHAfb3b8d7e3e258e03d44e76275f12a5f94dc41c1e
Reading-copy SHA-25688f7d240b39a7de20ab951b5e687ee209098463840bcfbb48cacc7e0006d81a1

Original source ↗

Recovered source transcript

'use client' import { logger } from '@thedaviddias/logging' import { useEffect, useState } from 'react' import type { WebsiteMetadata } from '@/lib/content-loader' /** * Hook that fetches and manages the list of websites from the API */ export function useWebsites() { const [websites, setWebsites] = useState<WebsiteMetadata[]>([]) const [isLoading, setIsLoading] = useState(true) const [error, setError] = useState<string | null>(null) useEffect(() => { /** * Fetches the list of websites from the API */ async function fetchWebsites() { try { setIsLoading(true) const response = await fetch('/api/websites') if (!response.ok) { throw new Error('Failed to fetch websites') } const data = await response.json() setWebsites(data) setError(null) } catch (err) { logger.error('Error fetching websites:', { data: err, tags: { type: 'hook' } }) setError(err instanceof Error ? err.message : 'Failed to fetch websites') } finally { setIsLoading(false) } } fetchWebsites() }, []) return { websites, isLoading, error } }

Search equations, builds, manuscript text, and recovered sources.