Clear stale preview iframe errors (#65)
This commit is contained in:
@@ -13,12 +13,11 @@ interface App {
|
||||
|
||||
export interface CodeViewProps {
|
||||
loading: boolean;
|
||||
error: Error | null;
|
||||
app: App | null;
|
||||
}
|
||||
|
||||
// Code view component that displays app files or status messages
|
||||
export const CodeView = ({ loading, error, app }: CodeViewProps) => {
|
||||
export const CodeView = ({ loading, app }: CodeViewProps) => {
|
||||
const selectedFile = useAtomValue(selectedFileAtom);
|
||||
const { refreshApp } = useLoadApp(app?.id ?? null);
|
||||
|
||||
@@ -26,14 +25,6 @@ export const CodeView = ({ loading, error, app }: CodeViewProps) => {
|
||||
return <div className="text-center py-4">Loading files...</div>;
|
||||
}
|
||||
|
||||
if (error) {
|
||||
return (
|
||||
<div className="text-center py-4 text-red-500">
|
||||
Error loading files: {error.message}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
if (!app) {
|
||||
return (
|
||||
<div className="text-center py-4 text-gray-500">No app selected</div>
|
||||
|
||||
Reference in New Issue
Block a user