-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate test app to app/ directory #1154
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
export default function TestAppLayout({ | ||
children, | ||
}: { | ||
children: React.ReactNode | ||
}) { | ||
return ( | ||
<html lang="en"> | ||
<body> | ||
<main>{children}</main> | ||
</body> | ||
</html> | ||
) | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
'use client'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Pages are server components by default. We want this to be a client component because we rely on |
||
|
||
import React, { useState, useEffect } from "react"; | ||
import { | ||
login, | ||
logout, | ||
handleIncomingRedirect, | ||
ISessionInfo, | ||
} from "@inrupt/solid-client-authn-browser"; | ||
import Notifications from "../notifications"; | ||
import Notifications from "../components/notifications"; | ||
|
||
const REDIRECT_URL = window.location.href; | ||
const APP_NAME = "Notifications browser-based tests app"; | ||
const DEFAULT_ISSUER = "https://login.inrupt.com/"; | ||
|
||
|
@@ -36,7 +37,7 @@ export default function AppContainer() { | |
// Login will redirect the user away so that they can log in the OIDC issuer, | ||
// and back to the provided redirect URL (which should be controlled by your app). | ||
await login({ | ||
redirectUrl: REDIRECT_URL, | ||
redirectUrl: "http://localhost:3001", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Using a dynamic redirect URL was bad practice. |
||
oidcIssuer: issuer, | ||
clientName: APP_NAME, | ||
}); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Change managed by NextJS |
Large diffs are not rendered by default.
This file was deleted.
This file was deleted.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Changes managed by NextJS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The root layout file is required.