Fix localhost
Handle automatic subdomain redirect
This commit is contained in:
@@ -24,6 +24,14 @@ const Auth = observer(({ auth, children }: Props) => {
|
||||
return <LoadingIndicator />;
|
||||
}
|
||||
|
||||
if (
|
||||
team.subdomain &&
|
||||
!window.location.hostname.startsWith(team.subdomain)
|
||||
) {
|
||||
window.location.href = `${team.url}${window.location.pathname}`;
|
||||
return <LoadingIndicator />;
|
||||
}
|
||||
|
||||
// Only initialize stores once. Kept in global scope because otherwise they
|
||||
// will get overridden on route change
|
||||
if (!authenticatedStores) {
|
||||
|
||||
@@ -32,7 +32,7 @@ const RealButton = styled.button`
|
||||
}
|
||||
|
||||
&:disabled {
|
||||
opacity: 0.8;
|
||||
opacity: 0.6;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user