Untitled

mail@pastecode.io avatar
unknown
jsx
2 years ago
1.7 kB
2
Indexable
Never
import Dashboard from "./Dashboard";
import Articles from "./Dashboard/Articles";
import Create from "./Dashboard/Articles/Create";
import Edit from "./Dashboard/Articles/Edit";
import Settings from "./Dashboard/Settings";
import Public from "./Public";
import ArticlesPreview from "./Public/ArticlesPreview";
import PasswordVerification from "./Public/PasswordVerification";

export const DASHBOARD_PATH = "/";
export const PUBLIC_PATH = "/public";
export const PASSWORD_VERIFICATION_PATH = "/public/authenticate";
export const ARTICLES_PREVIEW_PATH = "/public/articles/:slug?";
export const ARTICLES_PATH = "/articles";
export const SETTINGS_PATH = "/settings";
export const ARTICLES_CREATE_PATH = "/articles/create";
export const ARTICLES_EDIT_PATH = "/articles/:id/edit";
export const GENERAL_PATH = "/settings?tab=general";
export const REDIRECTIONS_PATH = "/settings?tab=redirections";
export const MANAGE_CATEGORIES_PATH = "/settings?tab=manage-categories";

export const PUBLIC_ROUTE = {
  path: PUBLIC_PATH,
  component: Public,
};

export const PASSWORD_VERIFICATION_ROUTE = {
  path: PASSWORD_VERIFICATION_PATH,
  component: PasswordVerification,
};

export const DASHBOARD_ROUTE = { path: DASHBOARD_PATH, component: Dashboard };

export const DASHBOARD_ROUTES = [
  {
    path: ARTICLES_PATH,
    component: Articles,
    label: "Articles",
  },
  {
    path: SETTINGS_PATH,
    component: Settings,
    label: "Settings",
  },
];

export const ARTICLES_ACTION_ROUTES = [
  {
    path: ARTICLES_CREATE_PATH,
    component: Create,
  },
  {
    path: ARTICLES_EDIT_PATH,
    component: Edit,
  },
];

export const ARTICLES_PREVIEW_ROUTE = {
  path: ARTICLES_PREVIEW_PATH,
  component: ArticlesPreview,
};