diff --git a/components/hero.tsx b/components/hero.tsx index 5a3da9a2..1648d388 100644 --- a/components/hero.tsx +++ b/components/hero.tsx @@ -14,10 +14,10 @@ const Hero: FunctionComponent<{ }> = function ({ title, subtitle, - cta, + cta = null, ctaContent, - mainPicture, - mainPictureAlt, + mainPicture = null, + mainPictureAlt = null, mainPictureWidth, mainPictureHeight, mainPictureSkewed, @@ -118,6 +118,4 @@ const Hero: FunctionComponent<{ ); }; -Hero.defaultProps = { cta: null, mainPicture: null, mainPictureAlt: null }; - export default Hero; diff --git a/pages/tools/index.tsx b/pages/tools/index.tsx index e48145b3..fb4e986c 100644 --- a/pages/tools/index.tsx +++ b/pages/tools/index.tsx @@ -176,6 +176,17 @@ const tools = [ } ], imageSrc: '/images/illustrations/mx-lookup.svg' + }, + { + title: 'UUID generator', + description: 'Generate unique UUIDs online', + links: [ + { + src: '/tools/uuid-generator/', + text: 'Generate' + } + ], + imageSrc: '/images/illustrations/uuid-generator.svg' } ]; diff --git a/pages/tools/uuid-generator.tsx b/pages/tools/uuid-generator.tsx new file mode 100644 index 00000000..ec5fdaff --- /dev/null +++ b/pages/tools/uuid-generator.tsx @@ -0,0 +1,93 @@ +import { FunctionComponent, useEffect, useState } from 'react'; +import CodeBlock from '../../components/code-block'; +import Hero from '../../components/hero'; +import Meta from '../../components/meta'; +import ToolsCta from '../../components/tools-cta'; +import Layout from '../../layout/layout'; + +const UuidGenerator: FunctionComponent = function () { + const generateUuid = () => { + return crypto.randomUUID(); + }; + const [uuid, setUuid] = useState(null); + + useEffect(() => { + if (typeof window !== 'undefined') { + setUuid(generateUuid()); + } + }, []); + + return ( + + + +
+
+ + +
+
+ +
+
+ +
+
+ +
+
+
+
+

About this tool

+

+ This tool generates unique UUIDs v4. Click on the "Generate" + button to get a new UUID. +

+

About UUIDs

+

+ UUIDs are unique identifiers that are used in software + development to identify resources. UUIDs are 128-bit numbers + represented as 32 hexadecimal digits separated by hyphens. Their + uniqueness and low probability of duplication make them ideal + for use in distributed systems. +

+

+ UUIDs are commonly used in databases, APIs, and other systems to + uniquely identify resources. They are also used in various + programming languages and frameworks to generate unique + identifiers. +

+

About UUID v4

+

+ UUID v4 is one of the four versions of UUIDs defined in RFC + 4122. It is a randomly generated UUID that is based on random + numbers. UUID v4 is the most commonly used version of UUIDs and + is suitable for most use cases. +

+

+ UUIDs v4 are not guaranteed to be unique, but the probability of + generating duplicate UUIDs is extremely low and can usually be + ignored. +

+
+
+
+
+
+ ); +}; + +export default UuidGenerator; diff --git a/public/images/illustrations/uuid-generator.svg b/public/images/illustrations/uuid-generator.svg new file mode 100644 index 00000000..66fb8463 --- /dev/null +++ b/public/images/illustrations/uuid-generator.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + +