Skip to content

Commit 69dbf8b

Browse files
committed
fix: resolve import sorting and TS annotation issues
1 parent e10b0b1 commit 69dbf8b

4 files changed

Lines changed: 11 additions & 16 deletions

File tree

components/open-library/Footer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import { Row, Col, Nav } from 'react-bootstrap';
2+
import { Col, Nav, Row } from 'react-bootstrap';
33

44
//
55
const ContentContainer: React.FC<{ children: React.ReactNode }> = ({

components/open-library/Layout.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
import React from 'react';
21
import Head from 'next/head';
3-
import NavbarComponent from './Navbar';
2+
import React from 'react';
3+
44
import FooterComponent from './Footer';
5+
import NavbarComponent from './Navbar';
56

67
// 内容容器组件,使内容居中但不添加边框
78
const ContentContainer: React.FC<{ children: React.ReactNode }> = ({
@@ -56,5 +57,5 @@ const Layout: React.FC<LayoutProps> = ({
5657
};
5758

5859
// 导出布局组件和内容容器组件,以便在页面中使用
59-
export { Layout, ContentContainer };
6060
export default Layout;
61+
export { ContentContainer, Layout };

components/open-library/Navbar.tsx

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
import React from 'react';
2-
import {
3-
Navbar,
4-
Nav,
5-
Container,
6-
Button,
7-
Form,
8-
FormControl,
9-
} from 'react-bootstrap';
2+
import { Button, Form, FormControl, Nav, Navbar } from 'react-bootstrap';
103

114
const NavbarComponent = () => {
125
return (

pages/open-library/index.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
import React, { useEffect } from 'react';
21
import Link from 'next/link';
3-
import { Row, Col, Button, Card, Form, Image, Stack } from 'react-bootstrap';
4-
import { Layout, ContentContainer } from '../../components/open-library/Layout';
2+
import React, { useEffect } from 'react';
3+
import { Button, Card, Col, Form, Image, Row, Stack } from 'react-bootstrap';
4+
5+
import { ContentContainer, Layout } from '../../components/open-library/Layout';
56

67
// TODO: Define a type for Book and Testimonial
78
type Book = {
@@ -79,7 +80,7 @@ export default function OpenLibraryHomepage() {
7980

8081
Object.entries(styles).forEach(([property, value]) => {
8182
if (value) {
82-
// @ts-ignore: dynamic property assignment
83+
// @ts-expect-error: dynamic property assignment
8384
element.style[property] = value;
8485
}
8586
});

0 commit comments

Comments
 (0)