From 3a88baae158535cb5ca5aea9cfa401957a3b6c82 Mon Sep 17 00:00:00 2001
From: Shalini {
>
{outputItem?.value}
- {development_tools_user_agent_info?.example_string_description} + { + development_tools_user_agent_info?.example_string_description + }
)} {development_tools_user_agent_info?.info_items && ( @@ -449,7 +455,7 @@ const Page = ({ params: { slug } }: { params: { slug: string } }) => { {item?.description} - ) + ), )} @@ -478,10 +484,16 @@ const Page = ({ params: { slug } }: { params: { slug: string } }) => { {development_tool_example?.example_input?.title} )} - {development_tool_example?.example_input?.json_data && ( -
+ {development_tool_example?.example_input
+ ?.json_data && (
+
- {development_tool_example?.example_input?.json_data}
+ {
+ development_tool_example?.example_input
+ ?.json_data
+ }
)}
@@ -497,7 +509,10 @@ const Page = ({ params: { slug } }: { params: { slug: string } }) => {
)}
{development_tool_example?.example_outputs?.outputs?.map(
(output: any, index: number) => (
-
+
{output?.mode && (
{output?.mode}
@@ -509,7 +524,9 @@ const Page = ({ params: { slug } }: { params: { slug: string } }) => {
)}
{output?.content && (
-
+
{output?.content}
@@ -521,7 +538,7 @@ const Page = ({ params: { slug } }: { params: { slug: string } }) => {
)}
- )
+ ),
)}
)}
@@ -564,11 +581,11 @@ const Page = ({ params: { slug } }: { params: { slug: string } }) => {
{text}
);
- }
+ },
)}
);
- }
+ },
)}
)}
@@ -590,7 +607,7 @@ const Page = ({ params: { slug } }: { params: { slug: string } }) => {
) : (
{parts}
- )
+ ),
)}
>
@@ -611,10 +628,11 @@ const Page = ({ params: { slug } }: { params: { slug: string } }) => {
{/* Primary Flex Layout for Step Key, Title, and Description */}
{guide?.step_key}
@@ -636,9 +654,12 @@ const Page = ({ params: { slug } }: { params: { slug: string } }) => {
{p?.steps_points_description
?.split(/(".*?")/)
.map(
- (part: string, i: number) =>
+ (
+ part: string,
+ i: number,
+ ) =>
part.startsWith("") &&
- part.endsWith("") ? (
+ part.endsWith("") ? (
{
{part
.split(
- /(\/\/.*?\/\/)/
+ /(\/\/.*?\/\/)/,
)
.map(
(
sub: string,
- j: number
+ j: number,
) =>
sub.startsWith(
- "//"
+ "//",
) &&
- sub.endsWith(
- "//"
- ) ? (
+ sub.endsWith(
+ "//",
+ ) ? (
{sub.slice(
2,
- -2
+ -2,
)}
) : (
sub
- )
+ ),
)}
- )
+ ),
)}
)}
@@ -686,7 +707,7 @@ const Page = ({ params: { slug } }: { params: { slug: string } }) => {
{p?.steps_subpoint?.map(
(
sub_p: any,
- subIndex: number
+ subIndex: number,
) => (
{sub_p?.title && (
@@ -701,14 +722,14 @@ const Page = ({ params: { slug } }: { params: { slug: string } }) => {
.map(
(
part: string,
- i: number
+ i: number,
) =>
part.startsWith(
- ""
+ "",
) &&
- part.endsWith(
- ""
- ) ? (
+ part.endsWith(
+ "",
+ ) ? (
{
>
{part
.split(
- /(\/\/.*?\/\/)/
+ /(\/\/.*?\/\/)/,
)
.map(
(
sub: string,
- j: number
+ j: number,
) =>
sub.startsWith(
- "//"
+ "//",
) &&
- sub.endsWith(
- "//"
- ) ? (
+ sub.endsWith(
+ "//",
+ ) ? (
{sub.slice(
2,
- -2
+ -2,
)}
) : (
sub
- )
+ ),
)}
- )
+ ),
)}
)}
- )
+ ),
)}
)}
- )
+ ),
)}
)}
{parts?.map((part: any, i: any) =>
part.startsWith("") &&
- part.endsWith("") ? (
+ part.endsWith("") ? (
<>
{
>
) : (
part
- )
+ ),
)}
@@ -785,7 +806,7 @@ const Page = ({ params: { slug } }: { params: { slug: string } }) => {
{desParts?.map((part: any, i: any) =>
part.startsWith("") &&
- part.endsWith("") ? (
+ part.endsWith("") ? (
{
) : (
part
- )
+ ),
)}
)}
);
- }
+ },
)}
)}
@@ -826,18 +847,20 @@ const Page = ({ params: { slug } }: { params: { slug: string } }) => {
how?.heading ? (
{how?.heading}
) : (
{tool?.name}
diff --git a/app/libs/constants.tsx b/app/libs/constants.tsx index f31c495..f909e39 100644 --- a/app/libs/constants.tsx +++ b/app/libs/constants.tsx @@ -59,7 +59,6 @@ import AsciiToDecimalConverter from '../components/developmentToolsComponent/asc import AsciiToUnicodeConverter from '../components/developmentToolsComponent/asciiToUnicodeConverter'; import BarcodeGenerator from '../components/developmentToolsComponent/barcodeGenerator'; import Base64Decoder from '../components/developmentToolsComponent/base64Decoder'; -import Base64Encoder from '../components/developmentToolsComponent/base64Encoder'; import BcdToDecimalConverter from '../components/developmentToolsComponent/bcdToDecimalConverter'; import BcryptGenerator from '../components/developmentToolsComponent/bcryptGenerator'; import BinaryToDecimalConverter from '../components/developmentToolsComponent/binaryToDecimalConverter'; @@ -186,7 +185,14 @@ import XmlToJsonConverter from '../components/developmentToolsComponent/xmlToJso import XorCalculator from '../components/developmentToolsComponent/xorCalculator'; import CurlToCodeConverter from '../components/developmentToolsComponent/curlToCodeConverter'; import YAMLFormatterAndBeautifier from '../components/developmentToolsComponent/yamlFormatterAndBeautifier'; - +import type { ComponentType } from "react"; +import dynamic from "next/dynamic"; +const Base64Encoder = dynamic( + () => import('../components/developmentToolsComponent/base64Encoder'), + { ssr: false, + loading: () =>Loading tool...
, + } +); export const WEB_URL = 'https://www.betterbugs.io'; // Default to Chrome URL during SSR/build, will be correctly determined on client side @@ -1789,710 +1795,709 @@ export const PATHS = { CURL_TO_CODE_CONVERTER: '/curl-to-code-converter', }; -export const developmentToolsRoutes = [ +export const developmentToolsRoutes: { + path: string; + component: ComponentType