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,14 +13,14 @@ Don't subscribe to dynamic state (searchParams, localStorage) if you only read i
```tsx
function ShareButton({ chatId }: { chatId: string }) {
const searchParams = useSearchParams()
const searchParams = useSearchParams();
const handleShare = () => {
const ref = searchParams.get('ref')
shareChat(chatId, { ref })
}
const ref = searchParams.get('ref');
shareChat(chatId, { ref });
};
return <button onClick={handleShare}>Share</button>
return <button onClick={handleShare}>Share</button>;
}
```
@@ -29,11 +29,11 @@ function ShareButton({ chatId }: { chatId: string }) {
```tsx
function ShareButton({ chatId }: { chatId: string }) {
const handleShare = () => {
const params = new URLSearchParams(window.location.search)
const ref = params.get('ref')
shareChat(chatId, { ref })
}
const params = new URLSearchParams(window.location.search);
const ref = params.get('ref');
shareChat(chatId, { ref });
};
return <button onClick={handleShare}>Share</button>
return <button onClick={handleShare}>Share</button>;
}
```