feat: auth & admin

This commit is contained in:
2026-06-03 10:41:53 +03:00
parent 612d0f0125
commit 7dc59fb3c4
120 changed files with 4683 additions and 2159 deletions
@@ -13,17 +13,17 @@ If a side effect is triggered by a specific user action (submit, click, drag), r
```tsx
function Form() {
const [submitted, setSubmitted] = useState(false)
const theme = useContext(ThemeContext)
const [submitted, setSubmitted] = useState(false);
const theme = useContext(ThemeContext);
useEffect(() => {
if (submitted) {
post('/api/register')
showToast('Registered', theme)
post('/api/register');
showToast('Registered', theme);
}
}, [submitted, theme])
}, [submitted, theme]);
return <button onClick={() => setSubmitted(true)}>Submit</button>
return <button onClick={() => setSubmitted(true)}>Submit</button>;
}
```
@@ -31,14 +31,14 @@ function Form() {
```tsx
function Form() {
const theme = useContext(ThemeContext)
const theme = useContext(ThemeContext);
function handleSubmit() {
post('/api/register')
showToast('Registered', theme)
post('/api/register');
showToast('Registered', theme);
}
return <button onClick={handleSubmit}>Submit</button>
return <button onClick={handleSubmit}>Submit</button>;
}
```