-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
42 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
"use client"; | ||
import { Studio } from "@/components/gui/studio"; | ||
import { IframeSQLiteDriver } from "@/drivers/iframe-driver"; | ||
import { useSearchParams } from "next/navigation"; | ||
import { useEffect, useMemo } from "react"; | ||
|
||
export default function EmbedPageClient() { | ||
const searchParams = useSearchParams(); | ||
const driver = useMemo( | ||
() => new IframeSQLiteDriver({ supportPragmaList: false }), | ||
[] | ||
); | ||
|
||
useEffect(() => { | ||
return driver.listen(); | ||
}, [driver]); | ||
|
||
return ( | ||
<Studio | ||
driver={driver} | ||
name={searchParams.get("name") || "Unnamed Connection"} | ||
color={searchParams.get("color") || "blue"} | ||
/> | ||
); | ||
} |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import ThemeLayout from "../../theme_layout"; | ||
import EmbedPageClient from "./page-client"; | ||
|
||
export default async function EmbedPage() { | ||
return ( | ||
<ThemeLayout overrideTheme={"dark"} disableToggle={true}> | ||
<EmbedPageClient /> | ||
</ThemeLayout> | ||
); | ||
} |
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