Files
riotpiao.com/lib/TerminalContext.tsx
Story Crater Bot b9ae470bc1 feat: portfolio redesign with i18n, RBC project showcase, CI/CD
- Add i18n support (EN/ZH) with language toggle
- Redesign header with education dropdown, contact copy buttons
- Add RBC project showcase with bullet points, skills highlighting
- Create terraform-drift placeholder page
- Add ProjectShowcase component with media toggle (image/video)
- Update experience timeline with action-driven descriptions
- Add Docker + Forgejo CI workflow for image builds
- Update K8s manifests for riotpiao.com ingress
- Add DESIGN.md documenting design system patterns
2026-08-31 13:59:46 -07:00

29 lines
699 B
TypeScript

'use client'
import { createContext, useContext, useState, ReactNode } from 'react'
interface TerminalContextType {
isOpen: boolean
setIsOpen: (open: boolean) => void
}
const TerminalContext = createContext<TerminalContextType | undefined>(undefined)
export function TerminalProvider({ children }: { children: ReactNode }) {
const [isOpen, setIsOpen] = useState(false)
return (
<TerminalContext.Provider value={{ isOpen, setIsOpen }}>
{children}
</TerminalContext.Provider>
)
}
export function useTerminal() {
const context = useContext(TerminalContext)
if (!context) {
throw new Error('useTerminal must be used within TerminalProvider')
}
return context
}