fix: nextjs landing utils

This commit is contained in:
arraysid
2025-05-25 14:17:36 +07:00
parent edc8fff13a
commit 738b0b5728
13 changed files with 30 additions and 37 deletions
@@ -1,6 +1,6 @@
'use client'; 'use client';
import { Button } from '@imphnen-frontend-service/shadcn-ui/atoms'; import { Button } from '@components';
import { motion, useInView } from 'framer-motion'; import { motion, useInView } from 'framer-motion';
import { useRef } from 'react'; import { useRef } from 'react';
@@ -1,7 +1,7 @@
'use client'; 'use client';
import { Button } from '@components';
import { Icon } from '@iconify/react'; import { Icon } from '@iconify/react';
import { Button } from '@imphnen-frontend-service/shadcn-ui/atoms';
import { motion, useInView } from 'framer-motion'; import { motion, useInView } from 'framer-motion';
import { useRef } from 'react'; import { useRef } from 'react';
@@ -188,8 +188,10 @@ export default function Footer() {
placeholder="Email Anda" placeholder="Email Anda"
className="flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50" className="flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50"
/> />
<button className="inline-flex items-center justify-center rounded-md bg-primary px-3 py-1 text-sm shadow hover:bg-primary/90 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 <button
font-bold text-black hover:text-white cursor-pointer"> className="inline-flex items-center justify-center rounded-md bg-primary px-3 py-1 text-sm shadow hover:bg-primary/90 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50
font-bold text-black hover:text-white cursor-pointer"
>
Daftar Daftar
</button> </button>
</div> </div>
@@ -1,11 +1,7 @@
'use client'; 'use client';
import { import { Button, MenuIcon, XIcon } from '@components';
Button, import { cn } from '@utils';
MenuIcon,
XIcon,
} from '@imphnen-frontend-service/shadcn-ui/atoms';
import { cn } from '@imphnen-frontend-service/utils';
import Image from 'next/image'; import Image from 'next/image';
import Link from 'next/link'; import Link from 'next/link';
import { useEffect, useState } from 'react'; import { useEffect, useState } from 'react';
@@ -1,11 +1,6 @@
'use client'; 'use client';
import { import { Button, CodeIcon, SparklesIcon, UsersIcon } from '@components';
Button,
CodeIcon,
SparklesIcon,
UsersIcon,
} from '@imphnen-frontend-service/shadcn-ui/atoms';
import { motion } from 'framer-motion'; import { motion } from 'framer-motion';
import Image from 'next/image'; import Image from 'next/image';
import { Fragment, useEffect, useState } from 'react'; import { Fragment, useEffect, useState } from 'react';
@@ -1,7 +1,7 @@
'use client'; 'use client';
import { Button } from '@components';
import { Icon } from '@iconify/react'; import { Icon } from '@iconify/react';
import { Button } from '@imphnen-frontend-service/shadcn-ui/atoms';
import { motion, useInView } from 'framer-motion'; import { motion, useInView } from 'framer-motion';
import { useRef } from 'react'; import { useRef } from 'react';
@@ -1,10 +1,6 @@
'use client'; 'use client';
import { import { Button, MoonIcon, SunIcon } from '@components';
Button,
MoonIcon,
SunIcon,
} from '@imphnen-frontend-service/shadcn-ui/atoms';
import { useTheme } from 'next-themes'; import { useTheme } from 'next-themes';
import { useEffect, useState } from 'react'; import { useEffect, useState } from 'react';
@@ -1,6 +1,6 @@
'use client'; 'use client';
import { QuoteIcon } from '@imphnen-frontend-service/shadcn-ui/atoms'; import { QuoteIcon } from '@components';
import { motion, useInView } from 'framer-motion'; import { motion, useInView } from 'framer-motion';
import Image from 'next/image'; import Image from 'next/image';
import { useRef } from 'react'; import { useRef } from 'react';
+10 -12
View File
@@ -11,11 +11,7 @@
"moduleResolution": "bundler", "moduleResolution": "bundler",
"resolveJsonModule": true, "resolveJsonModule": true,
"isolatedModules": true, "isolatedModules": true,
"lib": [ "lib": ["dom", "dom.iterable", "esnext"],
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true, "allowJs": true,
"allowSyntheticDefaultImports": true, "allowSyntheticDefaultImports": true,
"forceConsistentCasingInFileNames": true, "forceConsistentCasingInFileNames": true,
@@ -24,7 +20,14 @@
{ {
"name": "next" "name": "next"
} }
] ],
"baseUrl": ".",
"paths": {
"@components": ["../../libs/shadcn-ui/src/atoms/index.ts"],
"@utils": ["../../libs/shadcn-ui/src/lib/index.ts"],
"@schemas": ["../../libs/service/src/schemas/index.ts"],
"@/*": ["src/*"]
}
}, },
"include": [ "include": [
"**/*.js", "**/*.js",
@@ -36,10 +39,5 @@
"next-env.d.ts", "next-env.d.ts",
".next/types/**/*.ts" ".next/types/**/*.ts"
], ],
"exclude": [ "exclude": ["node_modules", "jest.config.ts", "**/*.spec.ts", "**/*.test.ts"]
"node_modules",
"jest.config.ts",
"**/*.spec.ts",
"**/*.test.ts"
]
} }
+1 -1
View File
@@ -1,9 +1,9 @@
'use client'; 'use client';
import { cn } from '@imphnen-frontend-service/utils';
import { Slot } from '@radix-ui/react-slot'; import { Slot } from '@radix-ui/react-slot';
import { cva, type VariantProps } from 'class-variance-authority'; import { cva, type VariantProps } from 'class-variance-authority';
import * as React from 'react'; import * as React from 'react';
import { cn } from '../lib/cn';
const buttonVariants = cva( const buttonVariants = cva(
'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0', 'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0',
+6
View File
@@ -0,0 +1,6 @@
import { ClassValue, clsx } from 'clsx';
import { twMerge } from 'tailwind-merge';
export const cn = (...inputs: ClassValue[]) => {
return twMerge(clsx(inputs));
};
+1
View File
@@ -0,0 +1 @@
export * from './cn';
-1
View File
@@ -16,7 +16,6 @@
"baseUrl": ".", "baseUrl": ".",
"paths": { "paths": {
"@imphnen-frontend-service/service": ["libs/service/src/index.ts"], "@imphnen-frontend-service/service": ["libs/service/src/index.ts"],
"@imphnen-frontend-service/shadcn-ui/atoms": ["libs/shadcn-ui/src/atoms/index.ts"],
"@imphnen-frontend-service/ui/atoms": ["libs/ui/src/atoms/index.ts"], "@imphnen-frontend-service/ui/atoms": ["libs/ui/src/atoms/index.ts"],
"@imphnen-frontend-service/ui/molecules": [ "@imphnen-frontend-service/ui/molecules": [
"libs/ui/src/molecules/index.ts" "libs/ui/src/molecules/index.ts"