Skip to content

Commit

Permalink
Fix duplicate name for interface and function
Browse files Browse the repository at this point in the history
a function can't have the same name as an interface, in addition to that, DocumentScreen is imported and used as a component and not as an interface in other files.
  • Loading branch information
ubugnu authored Jul 7, 2023
1 parent add71c3 commit c41bab2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/snippets/react/simple-page-implementation.ts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ import SubDocuments from './SubDocuments';
import DocumentHeader from './DocumentHeader';
import DocumentList from './DocumentList';

export interface DocumentScreen {
export interface DocumentScreenProps {
user?: {};
document?: Document;
subdocuments?: SubDocuments[];
}

function DocumentScreen({ user, document, subdocuments }) {
export function DocumentScreen({ user, document, subdocuments }: DocumentScreenProps) {
return (
<PageLayout user={user}>
<DocumentHeader document={document} />
Expand Down

0 comments on commit c41bab2

Please sign in to comment.