Download frontend/src/RefreshNotice.jsx from Wizzas/DefectRAG: direct link, hf CLI and curl.
- Browser
- Download file 1.08 kB
-
https://huggingface.co/Wizzas/DefectRAG/resolve/main/frontend/src/RefreshNotice.jsx
- Command line
-
hf download hf://Wizzas/DefectRAG/frontend/src/RefreshNotice.jsx
-
curl -L -o RefreshNotice.jsx https://huggingface.co/Wizzas/DefectRAG/resolve/main/frontend/src/RefreshNotice.jsx
1.08 kB
| import React from 'react'; | |
| export default function RefreshNotice({errors=[],block,refreshing,onRetry,onAccount,onPersonal,showAccess=true}){ | |
| if(errors.length)return <div className="error" role="alert"> | |
| Some information could not be updated: {errors.join(', ')}. Check the connection and try again. Shown results may be out of date.{' '} | |
| <button className="text-button" disabled={refreshing} aria-busy={refreshing} onClick={onRetry}>{refreshing?'Refreshing…':'Retry refresh'}</button> | |
| </div>; | |
| if(!block||!showAccess)return null; | |
| return <div className={block.failed?'error':'note'} role={block.failed?'alert':'status'}> | |
| <div>{block.reason}{' '} | |
| {block.action==='account'&&<button className="text-button" onClick={onAccount}>Open Staff workspace</button>} | |
| {block.action==='personal'&&<button className="text-button" onClick={onPersonal}>Switch to Personal Workspace</button>} | |
| {block.retry&&<button className="text-button" disabled={refreshing} aria-busy={refreshing} onClick={onRetry}>{refreshing?'Refreshing…':'Retry refresh'}</button>} | |
| </div> | |
| </div>; | |
| } | |