Test to access student DB in other apps (working)
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import ConsultStudents_test from "$root/routes/(apps)/mobility/(_islands)/ConsultStudents_test.tsx";
|
||||
import { getPartialsConfig, makePartials } from "$root/defaults/makePartials.tsx";
|
||||
import { FreshContext } from "$fresh/server.ts";
|
||||
import { State } from "$root/routes/_middleware.ts";
|
||||
//import EditStudents from "../(_islands)/EditStudents.tsx";
|
||||
|
||||
async function Mobility(_request: Request, _context: FreshContext<State>) {
|
||||
return (
|
||||
<>
|
||||
<h1>Test consult students</h1>
|
||||
<ConsultStudents_test />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export const config = getPartialsConfig();
|
||||
export default makePartials(Mobility);
|
||||
@@ -2,12 +2,12 @@ import {
|
||||
getPartialsConfig,
|
||||
makePartials,
|
||||
} from "$root/defaults/makePartials.tsx";
|
||||
import { EmptyObject } from "$root/defaults/interfaces.ts";
|
||||
import { FreshContext } from "$fresh/server.ts";
|
||||
import { State } from "$root/routes/_middleware.ts";
|
||||
|
||||
type MobilityIndexProps = EmptyObject;
|
||||
|
||||
export function Index(_props: MobilityIndexProps) {
|
||||
return <p>Nothing to see here...</p>;
|
||||
// deno-lint-ignore require-await
|
||||
export async function Index(_request: Request, context: FreshContext<State>) {
|
||||
return <h2>Welcome to {context.state.session?.displayName}.</h2>;
|
||||
}
|
||||
|
||||
export const config = getPartialsConfig();
|
||||
|
||||
Reference in New Issue
Block a user