Skip to content

Commit

Permalink
chore: reuse tc component from upload folder
Browse files Browse the repository at this point in the history
  • Loading branch information
lvyl9909 committed Oct 14, 2024
1 parent 5a27c8e commit 5bc4a96
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 96 deletions.
15 changes: 2 additions & 13 deletions app/tutorial/assertion/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import AssertionContent from "../components/assertion-content"; // Adjust the pa
import SidebarWithSearch from "../components/SidebarWithSearch"; // Import the SidebarWithSearch component
import Breadcrumbs from "../components/Breadcrumbs"; // 导入 Breadcrumbs 组件
import MarginContainer from "../components/MarginContainer";
import TermsAndPrivacy from "../../upload/components/terms-and-privacy";

const AssertionPage: React.FC = () => {
const [sidebarWidth, setSidebarWidth] = useState(256);
Expand Down Expand Up @@ -33,22 +34,10 @@ const AssertionPage: React.FC = () => {
<MarginContainer collapsed={collapsed} sidebarWidth={sidebarWidth}>
<Breadcrumbs paths={breadcrumbPaths} />
</MarginContainer>

{/* Assertion content */}
<AssertionContent sidebarWidth={sidebarWidth} collapsed={collapsed} />

{/* Footer Section */}
<p className="p-4 text-sm text-gray-500 text-center border-t mt-8">
By sharing your files or using our{" "}
<a href="#" className="text-blue-500 hover:underline">
Terms of Service
</a>{" "}
and{" "}
<a href="#" className="text-blue-500 hover:underline">
Privacy Policy
</a>
.
</p>
<TermsAndPrivacy /> {/* Reusing the TermsAndPrivacy component */}
</main>
</div>
);
Expand Down
18 changes: 4 additions & 14 deletions app/tutorial/introduction/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import React, { useState } from "react";
import IntroductionContent from "../components/introduction-content";
import SidebarWithSearch from "../components/SidebarWithSearch";
import Breadcrumbs from "../components/Breadcrumbs";
import MarginContainer from "@/app/tutorial/components/MarginContainer"; // 使用你现有的面包屑组件
import MarginContainer from "@/app/tutorial/components/MarginContainer";
import TermsAndPrivacy from "../../upload/components/terms-and-privacy";

const IntroductionPage: React.FC = () => {
const [sidebarWidth, setSidebarWidth] = useState(256); // initial sidebar width in pixels
Expand Down Expand Up @@ -35,25 +36,14 @@ const IntroductionPage: React.FC = () => {
<MarginContainer collapsed={collapsed} sidebarWidth={sidebarWidth}>
<Breadcrumbs paths={breadcrumbPaths} />
</MarginContainer>

{/* 主内容 */}
<IntroductionContent
sidebarWidth={sidebarWidth}
collapsed={collapsed}
/>

{/* Footer Section */}
<div className="p-4 text-sm text-gray-500 text-center border-t mt-8">
By sharing your files or using our service, you agree to our{" "}
<a href="#" className="text-blue-500 hover:underline">
Terms of Service
</a>{" "}
and{" "}
<a href="#" className="text-blue-500 hover:underline">
Privacy Policy
</a>
.
</div>
{/* Footer Section */}
<TermsAndPrivacy /> {/* Reusing the TermsAndPrivacy component */}
</main>
</div>
);
Expand Down
17 changes: 3 additions & 14 deletions app/tutorial/margin/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import React, { useState } from "react";
import MarginDifficultyContent from "../components/margin-content"; // 引入新的组件
import SidebarWithSearch from "../components/SidebarWithSearch";
import Breadcrumbs from "../components/Breadcrumbs";
import MarginContainer from "@/app/tutorial/components/MarginContainer"; // 导入面包屑组件
import MarginContainer from "@/app/tutorial/components/MarginContainer";
import TermsAndPrivacy from "@/app/upload/components/terms-and-privacy"; // 导入面包屑组件

const MarginDifficultyPage: React.FC = () => {
const [sidebarWidth, setSidebarWidth] = useState(256);
Expand Down Expand Up @@ -35,25 +36,13 @@ const MarginDifficultyPage: React.FC = () => {
<MarginContainer collapsed={collapsed} sidebarWidth={sidebarWidth}>
<Breadcrumbs paths={breadcrumbPaths} />
</MarginContainer>

{/* 内容部分 */}
<MarginDifficultyContent
sidebarWidth={sidebarWidth}
collapsed={collapsed}
/>

{/* Footer Section */}
<div className="p-4 text-sm text-gray-500 text-center border-t mt-8">
By sharing your files or using our{" "}
<a href="#" className="text-blue-500 hover:underline">
Terms of Service
</a>{" "}
and{" "}
<a href="#" className="text-blue-500 hover:underline">
Privacy Policy
</a>
.
</div>
<TermsAndPrivacy /> {/* Reusing the TermsAndPrivacy component */}
</main>
</div>
);
Expand Down
15 changes: 2 additions & 13 deletions app/tutorial/outcomes/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import OutcomesContent from "../components/outcomes-content"; //
import SidebarWithSearch from "../components/SidebarWithSearch"; //
import Breadcrumbs from "../components/Breadcrumbs";
import MarginContainer from "@/app/tutorial/components/MarginContainer";
import TermsAndPrivacy from "@/app/upload/components/terms-and-privacy";

const OutcomesPage: React.FC = () => {
const [sidebarWidth, setSidebarWidth] = useState(256); // 初始侧边栏宽度
Expand Down Expand Up @@ -35,22 +36,10 @@ const OutcomesPage: React.FC = () => {
<MarginContainer collapsed={collapsed} sidebarWidth={sidebarWidth}>
<Breadcrumbs paths={breadcrumbPaths} />
</MarginContainer>

{/* Outcomes content */}
<OutcomesContent sidebarWidth={sidebarWidth} collapsed={collapsed} />

{/* Footer Section */}
<p className="p-4 text-sm text-gray-500 text-center border-t mt-8">
By sharing your files or using our{" "}
<a href="#" className="text-blue-500 hover:underline">
Terms of Service
</a>{" "}
and{" "}
<a href="#" className="text-blue-500 hover:underline">
Privacy Policy
</a>
.
</p>
<TermsAndPrivacy /> {/* Reusing the TermsAndPrivacy component */}
</main>
</div>
);
Expand Down
17 changes: 3 additions & 14 deletions app/tutorial/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import React, { useState } from "react";
import TutorialContent from "./components/tutorial-content";
import SidebarWithSearch from "./components/SidebarWithSearch";
import Breadcrumbs from "./components/Breadcrumbs";
import MarginContainer from "@/app/tutorial/components/MarginContainer"; // 导入 Breadcrumbs 组件
import MarginContainer from "@/app/tutorial/components/MarginContainer";
import TermsAndPrivacy from "@/app/upload/components/terms-and-privacy"; // 导入 Breadcrumbs 组件

const Tutorial: React.FC = () => {
const [sidebarWidth, setSidebarWidth] = useState(256); // 设置侧边栏宽度
Expand Down Expand Up @@ -32,22 +33,10 @@ const Tutorial: React.FC = () => {
<MarginContainer collapsed={collapsed} sidebarWidth={sidebarWidth}>
<Breadcrumbs paths={breadcrumbPaths} />
</MarginContainer>

{/* Tutorial content */}
<TutorialContent sidebarWidth={sidebarWidth} collapsed={collapsed} />

{/* Footer Section */}
<div className="p-4 text-sm text-gray-500 text-center border-t mt-8">
By sharing your files or using our service, you agree to our{" "}
<a href="#" className="text-blue-500 hover:underline">
Terms of Service
</a>{" "}
and{" "}
<a href="#" className="text-blue-500 hover:underline">
Privacy Policy
</a>
.
</div>
<TermsAndPrivacy /> {/* Reusing the TermsAndPrivacy component */}
</main>
</div>
);
Expand Down
17 changes: 3 additions & 14 deletions app/tutorial/risk/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import React, { useState } from "react";
import RiskContent from "../components/risk-content";
import SidebarWithSearch from "../components/SidebarWithSearch";
import Breadcrumbs from "../components/Breadcrumbs";
import MarginContainer from "@/app/tutorial/components/MarginContainer"; // 导入 Breadcrumbs 组件
import MarginContainer from "@/app/tutorial/components/MarginContainer";
import TermsAndPrivacy from "@/app/upload/components/terms-and-privacy"; // 导入 Breadcrumbs 组件

const RiskPage: React.FC = () => {
const [sidebarWidth, setSidebarWidth] = useState(256);
Expand Down Expand Up @@ -32,21 +33,9 @@ const RiskPage: React.FC = () => {
<MarginContainer collapsed={collapsed} sidebarWidth={sidebarWidth}>
<Breadcrumbs paths={breadcrumbPaths} />
</MarginContainer>

<RiskContent sidebarWidth={sidebarWidth} collapsed={collapsed} />

{/* Footer Section */}
<div className="p-4 text-sm text-gray-500 text-center border-t mt-8">
By sharing your files or using our{" "}
<a href="#" className="text-blue-500 hover:underline">
Terms of Service
</a>{" "}
and{" "}
<a href="#" className="text-blue-500 hover:underline">
Privacy Policy
</a>
.
</div>
<TermsAndPrivacy /> {/* Reusing the TermsAndPrivacy component */}
</main>
</div>
);
Expand Down
17 changes: 3 additions & 14 deletions app/tutorial/usingassertion/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
import React, { useState } from "react";
import UsingAssertionsContent from "../components/using-assertions-content";
import SidebarWithSearch from "../components/SidebarWithSearch";
import Breadcrumbs from "../components/Breadcrumbs"; // 导入面包屑组件
import Breadcrumbs from "../components/Breadcrumbs";
import TermsAndPrivacy from "@/app/upload/components/terms-and-privacy"; // 导入面包屑组件

const UsingAssertionsPage: React.FC = () => {
const [sidebarWidth, setSidebarWidth] = useState(256);
Expand Down Expand Up @@ -41,25 +42,13 @@ const UsingAssertionsPage: React.FC = () => {
{/* 面包屑 */}
<Breadcrumbs paths={breadcrumbPaths} />
</div>

{/* 内容部分 */}
<UsingAssertionsContent
sidebarWidth={sidebarWidth}
collapsed={collapsed}
/>

{/* Footer Section */}
<div className="p-4 text-sm text-gray-500 text-center border-t mt-8">
By sharing your files or using our{" "}
<a href="#" className="text-blue-500 hover:underline">
Terms of Service
</a>{" "}
and{" "}
<a href="#" className="text-blue-500 hover:underline">
Privacy Policy
</a>
.
</div>
<TermsAndPrivacy /> {/* Reusing the TermsAndPrivacy component */}
</main>
</div>
);
Expand Down

0 comments on commit 5bc4a96

Please sign in to comment.