-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid same user in multi devices (#47)
- Loading branch information
1 parent
d351113
commit 265e14c
Showing
13 changed files
with
379 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import "../../testing-helpers/mock-firestore-auth"; | ||
import { act } from "react-dom/test-utils"; | ||
import fullRender from "../../testing-helpers/fullRender"; | ||
import BlockedSession from "./BlockedSession"; | ||
|
||
describe("BlockedSession", () => { | ||
it("renders", async () => { | ||
await act(() => fullRender(<BlockedSession />)); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import Box from "@mui/material/Box"; | ||
import HomeTemplate from "../../components/templates/HomeTemplate"; | ||
import useRedirectionRule from "../../hooks/useRedirectionRule"; | ||
import { Redirect } from "wouter"; | ||
import ErrorAlert from "../../components/basic/ErrorAlert"; | ||
|
||
export default function BlockedSession() { | ||
const goTo = useRedirectionRule(); | ||
|
||
if (goTo) { | ||
return <Redirect to={goTo} />; | ||
} | ||
|
||
return ( | ||
<HomeTemplate> | ||
<Box component="span" pr={1}> | ||
<ErrorAlert message="Account in use in another device. Reload to restore this session." /> | ||
</Box> | ||
</HomeTemplate> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.