feat: add utility for readable looping and conditional rendering of components

This commit is contained in:
euxzy
2025-06-29 11:46:02 +07:00
parent 890afa98db
commit 7321d28a76
7 changed files with 6 additions and 5 deletions
@@ -1,7 +1,7 @@
import { Button } from '@imphnen-frontend-service/ui/atoms'
import { For } from '@imphnen-frontend-service/utils'
import { FC, useRef } from 'react'
import { motion, useInView, Variants } from 'framer-motion'
import { For } from '../../../_components/logic/for'
import { StarFilled } from '@ant-design/icons'
export const TestimonialSection: FC = () => {
@@ -1,7 +1,7 @@
import { Button } from "@imphnen-frontend-service/ui/atoms";
import { For } from "@imphnen-frontend-service/utils";
import { FC, useRef } from "react";
import { motion, useInView, Variants } from 'framer-motion'
import { For } from "../../../_components/logic/for";
const OFFERS: { title: string; description: string; image: string }[] = [
{ title: "AI-Powered Learning", description: "Level Up Instantly!", image: "/image/what-we-offer/ai-powered-learning.webp" },
@@ -1,10 +1,8 @@
import { CloseOutlined, MenuOutlined } from "@ant-design/icons";
import { Button } from "@imphnen-frontend-service/ui/atoms";
import { cn } from "@imphnen-frontend-service/utils";
import { cn, For, Show } from "@imphnen-frontend-service/utils";
import { FC, useState } from "react";
import { Link, useLocation } from "react-router-dom";
import { For } from "../../_components/logic/for";
import { Show } from "../../_components/logic/show";
const MENUS: { label: string; href: string }[] = [
{ label: "Home", href: "/" },
+1
View File
@@ -6,3 +6,4 @@ export * from './local-storage';
export * from './cookies';
export * from './session';
export * from './constants';
export * from './logic';
+2
View File
@@ -0,0 +1,2 @@
export * from './for'
export * from './show'