mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-06 00:27:24 +00:00
Remove config object pattern.
This commit is contained in:
1 parent
fdfdcb4b16
commit
4f9d3ae1d1
2 files changed
+11
-23
No files matched your search
@@ -37,12 +37,10 @@ const IFRAME_DOMAIN = import.meta.env.VITE_IFRAME_DOMAIN || 'local-shakespeare.d
|
||||
interface PreviewPaneProps {
|
||||
projectId: string;
|
||||
activeTab: 'preview' | 'code';
|
||||
config?: {
|
||||
onToggleView?: () => void;
|
||||
projectName?: string;
|
||||
onFirstInteraction?: () => void;
|
||||
isPreviewable?: boolean;
|
||||
};
|
||||
onToggleView?: () => void;
|
||||
projectName?: string;
|
||||
onFirstInteraction?: () => void;
|
||||
isPreviewable?: boolean;
|
||||
}
|
||||
|
||||
interface JSONRPCRequest {
|
||||
@@ -77,13 +75,7 @@ interface JSONRPCResponse {
|
||||
|
||||
|
||||
|
||||
export function PreviewPane({ projectId, activeTab, config = {} }: PreviewPaneProps) {
|
||||
const {
|
||||
onToggleView,
|
||||
projectName,
|
||||
onFirstInteraction,
|
||||
isPreviewable = true,
|
||||
} = config;
|
||||
export function PreviewPane({ projectId, activeTab, onToggleView, projectName, onFirstInteraction, isPreviewable = true }: PreviewPaneProps) {
|
||||
const { t } = useTranslation();
|
||||
const [selectedFile, setSelectedFile] = useState<string | null>(null);
|
||||
const [fileContent, setFileContent] = useState<string>('');
|
||||
|
||||
Reference in new issue
Block a user