Skip to content

Commit c49a83a

Browse files
authored
Merge pull request #1190 from firebase/@invertase/align-react
2 parents 474fd65 + d2df304 commit c49a83a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+3701
-2611
lines changed

examples/react/lib/firebase/ui.tsx

Lines changed: 0 additions & 34 deletions
This file was deleted.

examples/react/src/App.css

Lines changed: 0 additions & 15 deletions
This file was deleted.

examples/react/src/App.jsx renamed to examples/react/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616

1717
import { NavLink } from "react-router";
18-
import { useUser } from "../lib/firebase/hooks";
18+
import { useUser } from "./firebase/hooks";
1919

2020
function App() {
2121
const user = useUser();

examples/react/src/assets/react.svg

Lines changed: 0 additions & 1 deletion
This file was deleted.

examples/react/lib/components/header.tsx renamed to examples/react/src/components/header.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import { NavLink } from "react-router";
2020
import { useUser } from "../firebase/hooks";
2121
import { signOut, type User } from "firebase/auth";
22-
import { auth } from "../firebase/clientApp";
22+
import { auth } from "../firebase/firebase";
2323

2424
export function Header() {
2525
const user = useUser();
File renamed without changes.
File renamed without changes.

examples/react/lib/firebase/hooks.ts renamed to examples/react/src/firebase/hooks.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import { useState } from "react";
1919
import { onAuthStateChanged } from "firebase/auth";
2020
import { User } from "firebase/auth";
2121
import { useEffect } from "react";
22-
import { auth } from "./clientApp";
22+
import { auth } from "./firebase";
2323

2424
export function useUser(initalUser?: User | null) {
2525
const [user, setUser] = useState<User | null>(initalUser ?? null);

examples/react/src/index.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616

1717
@import "tailwindcss";
18-
@import "@firebase-ui/styles/src/base.css";
18+
@import "@firebase-ui/styles/tailwind";
1919

2020
/* @import "@firebase-ui/styles/src/themes/dark.css"; */
2121
/* @import "@firebase-ui/styles/src/themes/brutalist.css"; */

examples/react/src/main.jsx renamed to examples/react/src/main.tsx

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,15 @@
1414
* limitations under the License.
1515
*/
1616

17-
import { BrowserRouter, RouterProvider, Routes, Route } from "react-router";
17+
import { BrowserRouter, Routes, Route } from "react-router";
1818

19-
import React from "react";
2019
import ReactDOM from "react-dom/client";
20+
import { FirebaseUIProvider } from "@firebase-ui/react";
21+
22+
import { ui } from "./firebase/firebase";
2123

2224
import App from "./App";
23-
import { Header } from "../lib/components/header";
24-
import { FirebaseUIProvider } from "../lib/firebase/ui";
25+
import { Header } from "./components/header";
2526

2627
/** Sign In */
2728
import SignInAuthScreenPage from "./screens/sign-in-auth-screen";
@@ -44,14 +45,20 @@ import SignUpAuthScreenWithOAuthPage from "./screens/sign-up-auth-screen";
4445
import OAuthScreenPage from "./screens/oauth-screen";
4546

4647
/** Password Reset */
47-
import PasswordResetScreenPage from "./screens/password-reset-screen";
48+
import ForgotPasswordPage from "./screens/forgot-password-screen";
4849

49-
const root = document.getElementById("root");
50+
const root = document.getElementById("root")!;
5051

5152
ReactDOM.createRoot(root).render(
5253
<BrowserRouter>
5354
<Header />
54-
<FirebaseUIProvider>
55+
<FirebaseUIProvider
56+
ui={ui}
57+
policies={{
58+
termsOfServiceUrl: "https://www.google.com",
59+
privacyPolicyUrl: "https://www.google.com",
60+
}}
61+
>
5562
<Routes>
5663
<Route path="/" element={<App />} />
5764
<Route path="/screens/sign-in-auth-screen" element={<SignInAuthScreenPage />} />
@@ -64,7 +71,7 @@ ReactDOM.createRoot(root).render(
6471
<Route path="/screens/sign-up-auth-screen" element={<SignUpAuthScreenPage />} />
6572
<Route path="/screens/sign-up-auth-screen-w-oauth" element={<SignUpAuthScreenWithOAuthPage />} />
6673
<Route path="/screens/oauth-screen" element={<OAuthScreenPage />} />
67-
<Route path="/screens/password-reset-screen" element={<PasswordResetScreenPage />} />
74+
<Route path="/screens/forgot-password-screen" element={<ForgotPasswordPage />} />
6875
</Routes>
6976
</FirebaseUIProvider>
7077
</BrowserRouter>

0 commit comments

Comments
 (0)