diff --git a/apps/landing/src/app/(detail)/docs/MenuItem.tsx b/apps/landing/src/app/(detail)/docs/MenuItem.tsx
index 66170220..2bd3e84d 100644
--- a/apps/landing/src/app/(detail)/docs/MenuItem.tsx
+++ b/apps/landing/src/app/(detail)/docs/MenuItem.tsx
@@ -3,7 +3,6 @@ import { Box, css, Flex, Text } from '@devup-ui/react'
import Link from 'next/link'
import { usePathname } from 'next/navigation'
-import { URL_PREFIX } from '../../../constants'
import { OpenMenuItem } from './OpenMenuItem'
export interface MenuItemProps {
@@ -19,12 +18,8 @@ export function MenuItem(props: MenuItemProps) {
const { children, to, subMenu } = props
const path = usePathname()
const selected = to
- ? path.startsWith(to) || path.startsWith(URL_PREFIX + to)
- : !!subMenu?.some((item) =>
- item.to
- ? path.startsWith(URL_PREFIX + item.to) || path.startsWith(item.to)
- : false,
- )
+ ? path.startsWith(to)
+ : !!subMenu?.some((item) => (item.to ? path.startsWith(item.to) : false))
if (subMenu) return
const inner = (
@@ -61,7 +56,7 @@ export function MenuItem(props: MenuItemProps) {
className={css({
textDecoration: 'none',
})}
- href={URL_PREFIX + to}
+ href={to}
>
{inner}
diff --git a/apps/landing/src/app/(detail)/docs/OpenMenuItem.tsx b/apps/landing/src/app/(detail)/docs/OpenMenuItem.tsx
index ad0d215a..0f186488 100644
--- a/apps/landing/src/app/(detail)/docs/OpenMenuItem.tsx
+++ b/apps/landing/src/app/(detail)/docs/OpenMenuItem.tsx
@@ -4,7 +4,6 @@ import Link from 'next/link'
import { usePathname } from 'next/navigation'
import { Fragment, useReducer } from 'react'
-import { URL_PREFIX } from '../../../constants'
import { MenuItemProps } from './MenuItem'
export function OpenMenuItem({
@@ -14,9 +13,7 @@ export function OpenMenuItem({
Required>) {
const path = usePathname()
const selected = subMenu.some((item) =>
- item.to
- ? path.startsWith(URL_PREFIX + item.to) || path.startsWith(item.to)
- : false,
+ item.to ? path.startsWith(item.to) : false,
)
const [open, handleOpen] = useReducer((state) => !state, selected)
return (
@@ -45,7 +42,7 @@ export function OpenMenuItem({
{subMenu && (
@@ -56,9 +53,7 @@ export function OpenMenuItem({
{subMenu.map(({ children, to }, idx) => {
- const selected = to
- ? path.startsWith(to) || path.startsWith(URL_PREFIX + to)
- : false
+ const selected = to ? path.startsWith(to) : false
const inner = (
{inner}
diff --git a/apps/landing/src/app/FeatureCard.tsx b/apps/landing/src/app/FeatureCard.tsx
index ed0a21e6..bc39d945 100644
--- a/apps/landing/src/app/FeatureCard.tsx
+++ b/apps/landing/src/app/FeatureCard.tsx
@@ -1,7 +1,5 @@
import { Flex, Image, Text, VStack } from '@devup-ui/react'
-import { URL_PREFIX } from '../constants'
-
interface FeatureCardProps {
title: string
description: string
@@ -12,7 +10,7 @@ export function FeatureCard({ icon, description, title }: FeatureCardProps) {
return (
-
+
diff --git a/apps/landing/src/app/layout.tsx b/apps/landing/src/app/layout.tsx
index 9e9a3f0f..af2272a8 100644
--- a/apps/landing/src/app/layout.tsx
+++ b/apps/landing/src/app/layout.tsx
@@ -7,7 +7,6 @@ import type { Metadata } from 'next'
import { Footer } from '../components/Footer'
import { Header } from '../components/Header'
import { SearchModal } from '../components/SearchModal'
-import { URL_PREFIX } from '../constants'
export const metadata: Metadata = {
title: 'Devup UI',
@@ -22,10 +21,20 @@ export default function RootLayout({
return (
+
+`,
+ }}
+ />
- {URL_PREFIX && }
-
+
+
{children}
diff --git a/apps/landing/src/app/page.tsx b/apps/landing/src/app/page.tsx
index aed38ecd..8b5ffea6 100644
--- a/apps/landing/src/app/page.tsx
+++ b/apps/landing/src/app/page.tsx
@@ -4,12 +4,12 @@ import Link from 'next/link'
import { CodeBoard } from '../components/CodeBoard'
import { Container } from '../components/Container'
import { Discord } from '../components/Discord'
-import { URL_PREFIX } from '../constants'
import { FeatureCard } from './FeatureCard'
export default function HomePage() {
return (
<>
+
-
+
Zero Config, Zero FOUC, Zero Runtime, CSS in JS Preprocessor
@@ -81,7 +81,7 @@ export default function HomePage() {
className={css({
textDecoration: 'none',
})}
- href={URL_PREFIX + '/docs/overview'}
+ href="/docs/overview"
>
Get started
-
+
diff --git a/apps/landing/src/components/Discord.tsx b/apps/landing/src/components/Discord.tsx
index c9e1bb3f..b0fe2435 100644
--- a/apps/landing/src/components/Discord.tsx
+++ b/apps/landing/src/components/Discord.tsx
@@ -1,14 +1,12 @@
import { css, Flex, Image, Text, VStack } from '@devup-ui/react'
import Link from 'next/link'
-import { URL_PREFIX } from '../constants'
-
export function Discord() {
return (
Join our Discord
-
+
diff --git a/apps/landing/src/components/Footer.tsx b/apps/landing/src/components/Footer.tsx
index ce1aa959..67f683a7 100644
--- a/apps/landing/src/components/Footer.tsx
+++ b/apps/landing/src/components/Footer.tsx
@@ -1,8 +1,6 @@
import { Box, css, Flex, Image, Text, VStack } from '@devup-ui/react'
import Link from 'next/link'
-import { URL_PREFIX } from '../constants'
-
export function Footer() {
return (
@@ -15,7 +13,7 @@ export function Footer() {
Docs
@@ -24,7 +22,7 @@ export function Footer() {
Overview
@@ -33,7 +31,7 @@ export function Footer() {
Installation
@@ -41,7 +39,7 @@ export function Footer() {
Features
@@ -49,7 +47,7 @@ export function Footer() {
API
@@ -57,7 +55,7 @@ export function Footer() {
Devup
@@ -66,10 +64,7 @@ export function Footer() {
-
+
Team
@@ -81,10 +76,10 @@ export function Footer() {
flexDir={['column', 'row']}
justifyContent="space-between"
>
-
+
diff --git a/apps/landing/src/components/Header/HeaderInput.tsx b/apps/landing/src/components/Header/HeaderInput.tsx
index d9fd2097..83266dd9 100644
--- a/apps/landing/src/components/Header/HeaderInput.tsx
+++ b/apps/landing/src/components/Header/HeaderInput.tsx
@@ -1,7 +1,5 @@
import { Flex, Image, Input } from '@devup-ui/react'
-import { URL_PREFIX } from '../../constants'
-
export function HeaderInput(props: React.ComponentProps<'input'>) {
return (
) {
p="8px 8px 6px"
w="100%"
>
-
+
@@ -33,7 +32,7 @@ export function MobMenu() {
className={css({
textDecoration: 'none',
})}
- href={URL_PREFIX + '/team'}
+ href="/team"
>
diff --git a/apps/landing/src/components/Header/index.tsx b/apps/landing/src/components/Header/index.tsx
index 673c873d..92b5ffb7 100644
--- a/apps/landing/src/components/Header/index.tsx
+++ b/apps/landing/src/components/Header/index.tsx
@@ -2,7 +2,6 @@ import { Box, css, Flex } from '@devup-ui/react'
import Link from 'next/link'
import { Suspense } from 'react'
-import { URL_PREFIX } from '../../constants'
import { Logo } from '../Logo'
import { Discord } from './Discord'
import { Github } from './Github'
@@ -46,7 +45,7 @@ export function Header() {
textDecoration: 'none',
ml: 4,
})}
- href={URL_PREFIX + '/'}
+ href="/"
>
@@ -59,7 +58,7 @@ export function Header() {
textDecoration: 'none',
ml: 4,
})}
- href={URL_PREFIX + '/'}
+ href="/"
>
@@ -71,7 +70,7 @@ export function Header() {
textDecoration: 'none',
ml: 4,
})}
- href={URL_PREFIX + '/'}
+ href="/"
>
@@ -85,7 +84,7 @@ export function Header() {
className={css({
textDecoration: 'none',
})}
- href={URL_PREFIX + '/docs/overview'}
+ href="/docs/overview"
>
@@ -95,7 +94,7 @@ export function Header() {
className={css({
textDecoration: 'none',
})}
- href={URL_PREFIX + '/team'}
+ href="/team"
>
diff --git a/apps/landing/src/components/Logo.tsx b/apps/landing/src/components/Logo.tsx
index 55861575..d3095c76 100644
--- a/apps/landing/src/components/Logo.tsx
+++ b/apps/landing/src/components/Logo.tsx
@@ -1,12 +1,11 @@
import { Center, Flex, Image } from '@devup-ui/react'
-import { URL_PREFIX } from '../constants'
import { LogoText } from './LogoText'
export function Logo() {
return (
-
+
diff --git a/apps/landing/src/components/SearchModal/SearchContent.tsx b/apps/landing/src/components/SearchModal/SearchContent.tsx
index ff473b06..412f574f 100644
--- a/apps/landing/src/components/SearchModal/SearchContent.tsx
+++ b/apps/landing/src/components/SearchModal/SearchContent.tsx
@@ -4,8 +4,6 @@ import Link from 'next/link'
import { useSearchParams } from 'next/navigation'
import { Fragment, useEffect, useMemo, useState } from 'react'
-import { URL_PREFIX } from '../../constants'
-
export function SearchContent() {
const query = useSearchParams().get('query')
const [data, setData] = useState<
@@ -17,7 +15,7 @@ export function SearchContent() {
>()
useEffect(() => {
if (query) {
- fetch(URL_PREFIX + '/search.json')
+ fetch('/search.json')
.then((response) => response.json())
.then(
(
diff --git a/apps/landing/src/constants.ts b/apps/landing/src/constants.ts
deleted file mode 100644
index 02b411ba..00000000
--- a/apps/landing/src/constants.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export const URL_PREFIX =
- process.env.NODE_ENV === 'production' ? '/devup-ui' : ''
diff --git a/apps/landing/src/utils/is-root.ts b/apps/landing/src/utils/is-root.ts
index 3b0ced54..027957c2 100644
--- a/apps/landing/src/utils/is-root.ts
+++ b/apps/landing/src/utils/is-root.ts
@@ -1,5 +1,3 @@
-import { URL_PREFIX } from '../constants'
-
export function isRoot(path: string) {
- return URL_PREFIX + '/' === path || '/' === path
+ return '/' === path
}