'use client';

import { useState, useRef, useEffect } from 'react';
import { useReadmeWaka } from '@/hooks/use-readme-waka';

export default function ReadmeWindow() {
    const { wakaContent, isLoading, error } = useReadmeWaka();

    if (!wakaContent) return null;

    return (
        <div className="font-mono rounded-b-lg">
            <div className="py-4">
                <h3 className="text-lg font-bold">WakaTime Stats</h3>
                <pre className="text-sm overflow-auto max-h-96 whitespace-pre-wrap break-words">
                    {wakaContent.replace(/```(txt)?/g, '')}
                </pre>
            </div>
        </div>
    );
}
