refacto(invite|signin): remove unused code + fix signin on invite page. (#9745)
- Replace `window.location.replace` by `useRedirect` hook. - Remove unused code: `switchWorkspace, addUserByInviteHash...` - Refacto `Invite` component. - Fix signin on invite modal.
This commit is contained in:
@ -6,13 +6,13 @@ export const useBuildWorkspaceUrl = () => {
|
||||
const domainConfiguration = useRecoilValue(domainConfigurationState);
|
||||
|
||||
const buildWorkspaceUrl = (
|
||||
subdomain?: string,
|
||||
subdomain: string,
|
||||
pathname?: string,
|
||||
searchParams?: Record<string, string>,
|
||||
) => {
|
||||
const url = new URL(window.location.href);
|
||||
|
||||
if (isDefined(subdomain) && subdomain.length !== 0) {
|
||||
if (subdomain.length !== 0) {
|
||||
url.hostname = `${subdomain}.${domainConfiguration.frontDomain}`;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user