Skip to content

Commit

Permalink
add new routes and menu
Browse files Browse the repository at this point in the history
  • Loading branch information
lifeparticle committed Oct 9, 2023
1 parent 57c137c commit 77543d3
Show file tree
Hide file tree
Showing 26 changed files with 37 additions and 14 deletions.
2 changes: 1 addition & 1 deletion ui/src/components/General/PopupSearch/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Input, InputRef, Modal } from "antd";
import { MENU_ITEMS } from "components/Layouts/Menu/utils/constants";
import { MENU_ITEMS } from "data/menuData";
import React, { useEffect, useRef, useState } from "react";
import { useNavigate } from "react-router-dom";
import style from "./PopSearch.module.scss";
Expand Down
2 changes: 1 addition & 1 deletion ui/src/components/Layouts/Menu/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Menu as AntdMenu, Layout } from "antd";
import { To, useNavigate } from "react-router-dom";
import { ITEMS } from "./utils/constants";
import { ITEMS } from "data/menuData";
import { MenuProps } from "./utils/types";
import style from "./Menu.module.scss";
import { classNames } from "utils/helper-functions/string";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export const MENU_ITEMS = [
name: routesById.boxshadow.title,
url: routesById.boxshadow.path,
icon: "Box",
show: IN_DEVELOPMENT,
show: true,
},
],
},
Expand Down Expand Up @@ -188,6 +188,19 @@ export const MENU_ITEMS = [
},
],
},
{
name: "Automation",
icon: "Workflow",
show: true,
children: [
{
name: routesById.creategithubissue.title,
url: routesById.creategithubissue.path,
icon: "Bug",
show: IN_DEVELOPMENT,
},
],
},
{
name: "Information",
icon: "BadgeInfo",
Expand Down
12 changes: 10 additions & 2 deletions ui/src/data/routeData.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@ type RouteId =
| "book"
| "borderradius"
| "boxshadow"
| "codeformatter"
| "colorpicker"
| "cookiepolicy"
| "course"
| "creategithubissue"
| "data"
| "designsystem"
| "diagramming"
Expand All @@ -25,7 +28,6 @@ type RouteId =
| "image"
| "interview"
| "jsontotypescript"
| "codeformatter"
| "mimetype"
| "mimetype"
| "movie"
Expand All @@ -37,7 +39,6 @@ type RouteId =
| "platform"
| "plugin"
| "privacypolicy"
| "cookiepolicy"
| "qrcode"
| "shadesandtints"
| "sorting"
Expand Down Expand Up @@ -370,6 +371,13 @@ export const routes: Route[] = [
"Ever wondered what’s different? We did too! Play spot the difference with text.",
component: Diffchecker,
},
{
id: "creategithubissue",
path: "/automation-scripts/create-github-issue",
title: "Create Github Issue",
description: "Create Github Issue",
component: PageNotFound,
},
{
id: "/",
path: "/",
Expand Down
2 changes: 2 additions & 0 deletions ui/src/pages/About/About.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
),
url("src/assets/About/card_bg.jpg") no-repeat left / cover;

background-blend-mode: color-dodge;

object-fit: cover;
background-color: #9c9c9c98;
display: flex;
Expand Down
2 changes: 1 addition & 1 deletion ui/src/pages/CSS/BoxShadow/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ const BoxShadow = () => {
<Card>
<CodeHighlightWithCopy
codeString={generateCSSCodeString()}
language="json"
language="css"
/>
</Card>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
} from "components/General/FormComponents";
import ColorPickerWithInput from "components/General/ColorPickerWithInput";
import { ChangeEvent } from "react";
import { SelectOption } from "../utils/types";
import { SelectOption } from "pages/Colors/ShadesAndTints/utils/types";

interface ColorInputsProps {
color: string;
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { render, screen } from "@testing-library/react";
import { describe, test, expect } from "vitest";
import user from "@testing-library/user-event";
import Avatar from "pages/Data/Avatar";
import Avatar from "pages/Generator/Avatar";

describe("Avatar component", () => {
test("render component without crash", () => {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { render, screen } from "@testing-library/react";
import { describe, test } from "vitest";
import user from "@testing-library/user-event";
import ImageGeneratorFromColors from "pages/Data/ImageGeneratorFromColors";
import ImageGeneratorFromColors from "pages/Generator/ImageGeneratorFromColors";

describe("Image Generator component", () => {
test("render a component without crash", () => {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions ui/src/pages/pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ const Pixel = lazy(() => import("pages/Converter/Pixel"));
const JsonToTypescript = lazy(() => import("pages/Converter/JsonToTypescript"));
const CodeFormatter = lazy(() => import("pages/Converter/CodeFormatter"));

const DataGenerator = lazy(() => import("pages/Data/DataGenerator"));
const DataGenerator = lazy(() => import("pages/Generator/DataGenerator"));
const ImageGeneratorFromColors = lazy(
() => import("pages/Data/ImageGeneratorFromColors")
() => import("pages/Generator/ImageGeneratorFromColors")
);
const Avatar = lazy(() => import("pages/Data/Avatar"));
const QRcode = lazy(() => import("pages/Data/QRcode"));
const Avatar = lazy(() => import("pages/Generator/Avatar"));
const QRcode = lazy(() => import("pages/Generator/QRcode"));

const Blog = lazy(() => import("pages/Resource/Blog"));
const Book = lazy(() => import("pages/Resource/Book"));
Expand Down
2 changes: 1 addition & 1 deletion ui/src/routes/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Suspense } from "react";
import { Route, Routes as RRDRoutes } from "react-router-dom";
import withPageTitle from "components/Hoc/withPageTitle/withPageTitle";
import { routes } from "../data/routeData";
import { routes } from "data/routeData";
import Spin from "components/General/Spin";

const Routes: React.FC = () => {
Expand Down

0 comments on commit 77543d3

Please sign in to comment.