refactor docs into feature folder
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import ReactMarkdown from "react-markdown";
|
||||
import remarkGfm from "remark-gfm";
|
||||
import { useDocsLanguage } from "@/pages/docs/useDocsLanguage";
|
||||
import { useDocsLanguage } from "@/features/docs/hooks/useDocsLanguage";
|
||||
|
||||
interface DocsDocumentProps {
|
||||
title: string;
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Link, Outlet } from "@tanstack/react-router";
|
||||
import { Home } from "lucide-react";
|
||||
import { DocsLanguageProvider } from "@/pages/docs/DocsLanguageProvider";
|
||||
import { docGroups } from "@/pages/docs/docsSections";
|
||||
import { DocsLanguageProvider } from "@/features/docs/providers/DocsLanguageProvider";
|
||||
import { docGroups } from "@/features/docs/data/docsSections";
|
||||
|
||||
export function DocsLayout(): React.JSX.Element {
|
||||
return (
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useContext } from "react";
|
||||
import { DocsLanguageContext } from "@/pages/docs/docsLanguageContext";
|
||||
import { DocsLanguageContext } from "@/features/docs/contexts/DocsLanguageContext";
|
||||
|
||||
export function useDocsLanguage() {
|
||||
const context = useContext(DocsLanguageContext);
|
||||
+1
-1
@@ -2,7 +2,7 @@ import { useState } from "react";
|
||||
import {
|
||||
DocsLanguageContext,
|
||||
type DocsLanguage,
|
||||
} from "@/pages/docs/docsLanguageContext";
|
||||
} from "@/features/docs/contexts/DocsLanguageContext";
|
||||
|
||||
interface DocsLanguageProviderProps {
|
||||
children: React.ReactNode;
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
import { Suspense, lazy } from "react";
|
||||
|
||||
const LazyDocsLayout = lazy(() =>
|
||||
import("@/pages/docs/DocsLayout").then((module) => ({
|
||||
import("@/features/docs/components/DocsLayout").then((module) => ({
|
||||
default: module.DocsLayout,
|
||||
})),
|
||||
);
|
||||
@@ -1,6 +1,6 @@
|
||||
import architecture from "../../../../docs/technical/architecture.md?raw";
|
||||
import { DocsDocument } from "@/pages/docs/DocsDocument";
|
||||
import { architectureFr } from "@/pages/docs/docsTranslations";
|
||||
import { DocsDocument } from "@/features/docs/components/DocsDocument";
|
||||
import { architectureFr } from "@/features/docs/data/docsTranslations";
|
||||
|
||||
export function DocsArchitecturePage(): React.JSX.Element {
|
||||
return (
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import editor from "../../../../docs/user/editor.md?raw";
|
||||
import { DocsDocument } from "@/pages/docs/DocsDocument";
|
||||
import { editorFr } from "@/pages/docs/docsTranslations";
|
||||
import { DocsDocument } from "@/features/docs/components/DocsDocument";
|
||||
import { editorFr } from "@/features/docs/data/docsTranslations";
|
||||
|
||||
export function DocsEditorPage(): React.JSX.Element {
|
||||
return (
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import features from "../../../../docs/user/features.md?raw";
|
||||
import { DocsDocument } from "@/pages/docs/DocsDocument";
|
||||
import { featuresFr } from "@/pages/docs/docsTranslations";
|
||||
import { DocsDocument } from "@/features/docs/components/DocsDocument";
|
||||
import { featuresFr } from "@/features/docs/data/docsTranslations";
|
||||
|
||||
export function DocsFeaturesPage(): React.JSX.Element {
|
||||
return (
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import readme from "../../../README.md?raw";
|
||||
import { DocsDocument } from "@/pages/docs/DocsDocument";
|
||||
import { readmeFr } from "@/pages/docs/docsTranslations";
|
||||
import { DocsDocument } from "@/features/docs/components/DocsDocument";
|
||||
import { readmeFr } from "@/features/docs/data/docsTranslations";
|
||||
|
||||
export function DocsReadmePage(): React.JSX.Element {
|
||||
return (
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import targetArchitecture from "../../../../docs/technical/target-architecture.md?raw";
|
||||
import { DocsDocument } from "@/pages/docs/DocsDocument";
|
||||
import { targetArchitectureFr } from "@/pages/docs/docsTranslations";
|
||||
import { DocsDocument } from "@/features/docs/components/DocsDocument";
|
||||
import { targetArchitectureFr } from "@/features/docs/data/docsTranslations";
|
||||
|
||||
export function DocsTargetArchitecturePage(): React.JSX.Element {
|
||||
return (
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import technicalEditor from "../../../../docs/technical/editor.md?raw";
|
||||
import { DocsDocument } from "@/pages/docs/DocsDocument";
|
||||
import { DocsDocument } from "@/features/docs/components/DocsDocument";
|
||||
|
||||
export function DocsTechnicalEditorPage(): React.JSX.Element {
|
||||
return (
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ import {
|
||||
DocsReadmeRoute,
|
||||
DocsTargetArchitectureRoute,
|
||||
DocsTechnicalEditorRoute,
|
||||
} from "@/pages/docs/DocsRouteComponents";
|
||||
} from "@/features/docs/routes/DocsRouteComponents";
|
||||
|
||||
const rootRoute = createRootRoute({
|
||||
component: Outlet,
|
||||
|
||||
Reference in New Issue
Block a user