mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-25 19:15:18 +02:00
remove redundant comments
This commit is contained in:
parent
edc5f379d3
commit
1d3fd8d47c
1 changed files with 3 additions and 4 deletions
|
|
@ -177,10 +177,10 @@ const DashboardPage = () => {
|
||||||
// Auto-redirect to chat for users with exactly 1 search space, or auto-create if none
|
// Auto-redirect to chat for users with exactly 1 search space, or auto-create if none
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const handleAutoRedirect = async () => {
|
const handleAutoRedirect = async () => {
|
||||||
// Don't run if still loading or already attempted
|
|
||||||
if (loading || hasAttemptedAutoCreate.current) return;
|
if (loading || hasAttemptedAutoCreate.current) return;
|
||||||
|
|
||||||
// If user has exactly 1 search space, redirect to its chat
|
|
||||||
if (searchSpaces.length === 1) {
|
if (searchSpaces.length === 1) {
|
||||||
router.replace(`/dashboard/${searchSpaces[0].id}/new-chat`);
|
router.replace(`/dashboard/${searchSpaces[0].id}/new-chat`);
|
||||||
return;
|
return;
|
||||||
|
|
@ -190,8 +190,7 @@ const DashboardPage = () => {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If no search spaces exist (edge case for users who registered before this feature),
|
|
||||||
// auto-create one and redirect
|
|
||||||
hasAttemptedAutoCreate.current = true;
|
hasAttemptedAutoCreate.current = true;
|
||||||
setIsAutoCreating(true);
|
setIsAutoCreating(true);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue