-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update react-multitenancy to match new boilerplate.
- Loading branch information
connor
authored and
connor
committed
Dec 30, 2024
1 parent
0833ff9
commit 55364fb
Showing
9 changed files
with
97 additions
and
75 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
6 changes: 3 additions & 3 deletions
6
boilerplate/frontend/react-multitenancy/src/Home/CallAPIView.tsx
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
35 changes: 20 additions & 15 deletions
35
boilerplate/frontend/react-multitenancy/src/Home/index.tsx
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 |
---|---|---|
@@ -1,21 +1,26 @@ | ||
import SuccessView from "./SuccessView"; | ||
import { useSessionContext } from "supertokens-auth-react/recipe/session"; | ||
import "./Home.css"; | ||
|
||
export default function Home() { | ||
const sessionContext = useSessionContext(); | ||
|
||
if (sessionContext.loading === true) { | ||
return null; | ||
} | ||
|
||
console.log(sessionContext); | ||
return ( | ||
<div className="fill" id="home-container"> | ||
<SuccessView | ||
userId={sessionContext.userId} | ||
tenantId={sessionContext.accessTokenPayload["tId"] || undefined} | ||
/> | ||
<div className="logos"> | ||
<img src="/ST.svg" alt="SuperTokens" /> | ||
<span>x</span> | ||
<img src="/React.svg" alt="React" /> | ||
</div> | ||
<div className="main-container"> | ||
<div className="inner-content"> | ||
<p> | ||
<strong>SuperTokens</strong> x <strong>React</strong> <br /> example project | ||
</p> | ||
<div className="buttons"> | ||
<a href="/auth" className="sessionButton"> | ||
Sign-up / Login | ||
</a> | ||
<a href="/dashboard" className="sessionButton"> | ||
Dashboard | ||
</a> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
} |
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