Remove unused javascript (#2470)

This commit is contained in:
Ajay Bura
2025-08-29 15:04:52 +05:30
committed by GitHub
parent 399b1a373e
commit 90ca8ca2c5
214 changed files with 341 additions and 8768 deletions

View File

@@ -30,7 +30,6 @@ import {
_SERVER_PATH,
CREATE_PATH,
} from './paths';
import { isAuthenticated } from '../../client/state/auth';
import {
getAppPathFromHref,
getExploreFeaturedPath,
@@ -68,6 +67,7 @@ import { HomeCreateRoom } from './client/home/CreateRoom';
import { Create } from './client/create';
import { CreateSpaceModalRenderer } from '../features/create-space';
import { SearchModalRenderer } from '../features/search';
import { getFallbackSession } from '../state/sessions';
export const createRouter = (clientConfig: ClientConfig, screenSize: ScreenSize) => {
const { hashRouter } = clientConfig;
@@ -78,7 +78,7 @@ export const createRouter = (clientConfig: ClientConfig, screenSize: ScreenSize)
<Route
index
loader={() => {
if (isAuthenticated()) return redirect(getHomePath());
if (getFallbackSession()) return redirect(getHomePath());
const afterLoginPath = getAppPathFromHref(getOriginBaseUrl(), window.location.href);
if (afterLoginPath) setAfterLoginRedirectPath(afterLoginPath);
return redirect(getLoginPath());
@@ -86,7 +86,7 @@ export const createRouter = (clientConfig: ClientConfig, screenSize: ScreenSize)
/>
<Route
loader={() => {
if (isAuthenticated()) {
if (getFallbackSession()) {
return redirect(getHomePath());
}
@@ -106,7 +106,7 @@ export const createRouter = (clientConfig: ClientConfig, screenSize: ScreenSize)
<Route
loader={() => {
if (!isAuthenticated()) {
if (!getFallbackSession()) {
const afterLoginPath = getAppPathFromHref(
getOriginBaseUrl(hashRouter),
window.location.href