Skip to content

Commit

Permalink
Migrate to using an app/ directory
Browse files Browse the repository at this point in the history
  • Loading branch information
NSeydoux committed Dec 18, 2024
1 parent 81d49e6 commit 8f48868
Show file tree
Hide file tree
Showing 8 changed files with 142 additions and 120 deletions.
13 changes: 13 additions & 0 deletions e2e/browser/test-app/app/layout.tsx
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';

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/";

Expand Down Expand Up @@ -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",
oidcIssuer: issuer,
clientName: APP_NAME,
});
Expand Down
2 changes: 1 addition & 1 deletion e2e/browser/test-app/next-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
195 changes: 103 additions & 92 deletions e2e/browser/test-app/package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion e2e/browser/test-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"@inrupt/solid-client": "^2.0.0",
"@inrupt/solid-client-authn-browser": "^2.3.0",
"@inrupt/solid-client-notifications": "file:../../../",
"next": "^15.0.4",
"next": "^15.1.1",
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
Expand Down
7 changes: 0 additions & 7 deletions e2e/browser/test-app/pages/_app.tsx

This file was deleted.

12 changes: 0 additions & 12 deletions e2e/browser/test-app/pages/index.tsx

This file was deleted.

24 changes: 20 additions & 4 deletions e2e/browser/test-app/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
{
"compilerOptions": {
"target": "es2017",
"lib": ["dom", "dom.iterable", "esnext"],
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
Expand All @@ -13,8 +17,20 @@
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true
"incremental": true,
"plugins": [
{
"name": "next"
}
]
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"]
"include": [
"**/*.ts",
"**/*.tsx",
"next-env.d.ts",
".next/types/**/*.ts"
],
"exclude": [
"node_modules"
]
}

0 comments on commit 8f48868

Please sign in to comment.