Save responses in DB

This commit is contained in:
Gregory Schier
2023-02-22 18:53:44 -08:00
parent 31eb03da0d
commit fbcbf2e5a5
9 changed files with 530 additions and 138 deletions

View File

@@ -36,6 +36,7 @@ function App() {
resp.body = resp.body.replace(/<head>/gi, `<head><base href="${resp.url}"/>`);
}
setResponse(resp);
console.log('Response', resp.status, resp.url, { resp });
} catch (err) {
setError(`${err}`);
}

View File

@@ -46,7 +46,7 @@ export function Input({
id={id}
className={classnames(
className,
'bg-transparent pl-3 pr-2 h-full w-0 min-w-[100%] focus:outline-none',
'bg-transparent min-w-0 pl-3 pr-2 w-full h-full focus:outline-none',
)}
{...props}
/>

View File

@@ -27,7 +27,6 @@ const syntaxExtensions: Record<string, LanguageSupport> = {
};
const extensions = [basicSetup, syntaxHighlighting(myHighlightStyle)];
export type EditorLanguage = keyof typeof syntaxExtensions;
export default function useCodeMirror({
value,

View File

@@ -4,11 +4,13 @@ import App from './App';
import { HelmetProvider } from 'react-helmet-async';
import { MotionConfig } from 'framer-motion';
import init, { greet } from 'hello';
import { invoke } from '@tauri-apps/api'
import './main.css';
await init();
greet();
await invoke('load_db');
ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
<React.StrictMode>