refactor(products): organize product showcase into feature module

This commit is contained in:
2026-09-29 09:44:00 +03:30
parent fcded6f139
commit ae6018a1f0
13 changed files with 68 additions and 45 deletions
+57 -34
View File
@@ -5,9 +5,17 @@
</component>
<component name="ChangeListManager">
<list default="true" id="bb7b50a5-be9c-4cd7-a05b-979f0e91b173" name="Changes" comment="Replace desktop showcase video with scroll-driven color backgrounds">
<change beforePath="$PROJECT_DIR$/.idea/shelf/Uncommitted_changes_before_Checkout_at_9_20_26,_11_55 AM_[Changes]/shelved.patch" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/shelf/Uncommitted_changes_before_Checkout_at_9_20_26__11_55AM__Changes_.xml" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/page.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/app/page.tsx" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/products/[id]/page.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/app/products/[id]/page.tsx" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/products/page.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/app/products/page.tsx" afterDir="false" />
<change beforePath="$PROJECT_DIR$/components/FloatingItems.tsx" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/components/HorizontalShowcase.tsx" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/components/MobileShowcase.tsx" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/components/ProductDetails.tsx" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/components/ProductsPage.tsx" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/components/ShowcaseSection.tsx" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/components/VendingCard.tsx" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/data/products.ts" beforeDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -91,43 +99,49 @@
&quot;associatedIndex&quot;: 2
}</component>
<component name="ProjectId" id="3HDEfy1HyzjDcELlwvnRRXxPltq" />
<component name="ProjectLevelVcsManager">
<ConfirmationsSetting value="2" id="Add" />
</component>
<component name="ProjectViewState">
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent">{
&quot;keyToString&quot;: {
&quot;ASKED_MARK_IGNORED_FILES_AS_EXCLUDED&quot;: &quot;true&quot;,
&quot;ModuleVcsDetector.initialDetectionPerformed&quot;: &quot;true&quot;,
&quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
&quot;RunOnceActivity.TerminalTabsStorage.copyFrom.TerminalArrangementManager.252&quot;: &quot;true&quot;,
&quot;RunOnceActivity.git.unshallow&quot;: &quot;true&quot;,
&quot;RunOnceActivity.typescript.service.memoryLimit.init&quot;: &quot;true&quot;,
&quot;codeWithMe.voiceChat.enabledByDefault&quot;: &quot;false&quot;,
&quot;com.intellij.ml.llm.matterhorn.ej.ui.settings.DefaultModelSelectionForGA.v1&quot;: &quot;true&quot;,
&quot;git-widget-placeholder&quot;: &quot;develop&quot;,
&quot;javascript.nodejs.core.library.configured.version&quot;: &quot;24.20.0&quot;,
&quot;javascript.nodejs.core.library.typings.version&quot;: &quot;24.13.3&quot;,
&quot;javascript.preferred.runtime.type.id&quot;: &quot;node&quot;,
&quot;js.debugger.nextJs.config.created.client&quot;: &quot;true&quot;,
&quot;js.debugger.nextJs.config.created.server&quot;: &quot;true&quot;,
&quot;junie.onboarding.icon.badge.shown&quot;: &quot;true&quot;,
&quot;kronk.content.tree.expanded.paths&quot;: &quot;&quot;,
&quot;last_opened_file_path&quot;: &quot;/home/hamed/Documents/Projects/GItLabRepo/device_web&quot;,
&quot;node.js.detected.package.eslint&quot;: &quot;true&quot;,
&quot;node.js.detected.package.tslint&quot;: &quot;true&quot;,
&quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;,
&quot;node.js.selected.package.tslint&quot;: &quot;(autodetect)&quot;,
&quot;nodejs_package_manager_path&quot;: &quot;npm&quot;,
&quot;prettierjs.PrettierConfiguration.Package&quot;: &quot;/home/hamed/Documents/Projects/GIthubRepo/robot-market-landing/node_modules/prettier&quot;,
&quot;settings.editor.selected.configurable&quot;: &quot;settings.javascript.prettier&quot;,
&quot;to.speed.mode.migration.done&quot;: &quot;true&quot;,
&quot;ts.external.directory.path&quot;: &quot;/home/hamed/Documents/Projects/GIthubRepo/robot-market-landing/node_modules/typescript/lib&quot;,
&quot;vue.rearranger.settings.migration&quot;: &quot;true&quot;
<component name="PropertiesComponent"><![CDATA[{
"keyToString": {
"ASKED_MARK_IGNORED_FILES_AS_EXCLUDED": "true",
"ModuleVcsDetector.initialDetectionPerformed": "true",
"RunOnceActivity.ShowReadmeOnStart": "true",
"RunOnceActivity.TerminalTabsStorage.copyFrom.TerminalArrangementManager.252": "true",
"RunOnceActivity.git.unshallow": "true",
"RunOnceActivity.typescript.service.memoryLimit.init": "true",
"codeWithMe.voiceChat.enabledByDefault": "false",
"com.intellij.ml.llm.matterhorn.ej.ui.settings.DefaultModelSelectionForGA.v1": "true",
"git-widget-placeholder": "develop",
"javascript.nodejs.core.library.configured.version": "24.20.0",
"javascript.nodejs.core.library.typings.version": "24.13.3",
"javascript.preferred.runtime.type.id": "node",
"js.debugger.nextJs.config.created.client": "true",
"js.debugger.nextJs.config.created.server": "true",
"junie.onboarding.icon.badge.shown": "true",
"kronk.content.tree.expanded.paths": "",
"last_opened_file_path": "/home/hamed/Documents/Projects/GItLabRepo/device_web",
"node.js.detected.package.eslint": "true",
"node.js.detected.package.jshint": "true",
"node.js.detected.package.tslint": "true",
"node.js.selected.package.eslint": "(autodetect)",
"node.js.selected.package.jshint": "",
"node.js.selected.package.tslint": "(autodetect)",
"nodejs_package_manager_path": "npm",
"prettierjs.PrettierConfiguration.Package": "/home/hamed/Documents/Projects/GIthubRepo/robot-market-landing/node_modules/prettier",
"settings.editor.selected.configurable": "settings.javascript.prettier",
"to.speed.mode.migration.done": "true",
"ts.external.directory.path": "/home/hamed/Documents/Projects/GIthubRepo/robot-market-landing/node_modules/typescript/lib",
"vue.rearranger.settings.migration": "true"
}
}</component>
}]]></component>
<component name="RecentsManager">
<key name="MoveFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$" />
<recent name="D:\Project\GitHubRepo\robot-market-landing\public\images\icons" />
<recent name="D:\Project\GitHubRepo\robot-market-landing\public\images" />
<recent name="D:\Project\GitHubRepo\robot-market-landing\app" />
@@ -220,6 +234,7 @@
<workItem from="1790568898974" duration="91000" />
<workItem from="1790569032481" duration="788000" />
<workItem from="1790573950198" duration="16000" />
<workItem from="1790660862579" duration="1055000" />
</task>
<task id="LOCAL-00001" summary="update">
<option name="closed" value="true" />
@@ -565,7 +580,15 @@
<option name="project" value="LOCAL" />
<updated>1790492715355</updated>
</task>
<option name="localTasksCounter" value="44" />
<task id="LOCAL-00044" summary="Replace desktop showcase video with scroll-driven color backgrounds">
<option name="closed" value="true" />
<created>1790661145102</created>
<option name="number" value="00044" />
<option name="presentableId" value="LOCAL-00044" />
<option name="project" value="LOCAL" />
<updated>1790661145102</updated>
</task>
<option name="localTasksCounter" value="45" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
+1 -1
View File
@@ -1,5 +1,5 @@
import LocationsSection from '@/components/LocationsSection';
import ShowcaseSection from '@/components/ShowcaseSection';
import {ShowcaseSection} from '@/features/products';
import FeaturesSection from '@/components/FeaturesSection';
import AboutSection from '@/components/AboutSection';
import HeroSection from '@/components/HeroSection';
+1 -1
View File
@@ -1,7 +1,7 @@
import type {Metadata} from 'next';
import {notFound} from 'next/navigation';
import {content} from '@/data/content';
import ProductDetails from '@/components/ProductDetails';
import {ProductDetails} from '@/features/products';
import ProtectedPage from '@/components/auth/ProtectedPage';
type Props = {params: {id: string}};
+1 -1
View File
@@ -1,6 +1,6 @@
import {Suspense} from 'react';
import type {Metadata} from 'next';
import ProductsPage from '@/components/ProductsPage';
import {ProductsPage} from '@/features/products';
export const metadata: Metadata = {title: 'همه محصولات | روبات مارکت'};
@@ -4,7 +4,7 @@ import {useEffect, useRef} from 'react';
import {gsap} from 'gsap';
import {ScrollTrigger} from 'gsap/ScrollTrigger';
import VendingCard from './VendingCard';
import {featuredMachines} from '@/data/products';
import {featuredMachines} from '@/features/products/data/catalog';
import {useLanguage} from '@/app/context/LanguageContext';
gsap.registerPlugin(ScrollTrigger);
@@ -1,7 +1,7 @@
'use client';
import {PhoneOutlined} from '@ant-design/icons';
import {featuredMachines} from '@/data/products';
import {featuredMachines} from '@/features/products/data/catalog';
import {useLanguage} from '@/app/context/LanguageContext';
import {commerceCopy} from '@/data/commerce';
@@ -5,7 +5,7 @@ import Link from 'next/link';
import {CheckCircleOutlined} from '@ant-design/icons';
import {useLanguage} from '@/app/context/LanguageContext';
import {commerceCopy} from '@/data/commerce';
import QuantityControl from './QuantityControl';
import QuantityControl from '@/components/QuantityControl';
export default function ProductDetails({id}: {id: string}) {
const {t, locale} = useLanguage();
@@ -4,8 +4,8 @@ import Link from 'next/link';
import {usePathname, useRouter, useSearchParams} from 'next/navigation';
import {useLanguage} from '@/app/context/LanguageContext';
import {commerceCopy} from '@/data/commerce';
import {filterMachines, productCategories} from '@/data/products';
import QuantityControl from './QuantityControl';
import {filterMachines, productCategories} from '@/features/products/data/catalog';
import QuantityControl from '@/components/QuantityControl';
export default function ProductsPage() {
const {t, locale} = useLanguage();
@@ -3,9 +3,6 @@
import type {Machine} from '@/types/domain';
import type {MouseEvent} from 'react';
import {useRef} from 'react';
import QuantityControl from './QuantityControl';
import ProtectedLink from './auth/ProtectedLink';
import {commerceCopy} from '@/data/commerce';
import {useLanguage} from '@/app/context/LanguageContext';
import FloatingItems from './FloatingItems';
import {floatingSnacks} from '@/data/content';
+3
View File
@@ -0,0 +1,3 @@
export {default as ProductDetails} from './components/ProductDetails';
export {default as ProductsPage} from './components/ProductsPage';
export {default as ShowcaseSection} from './components/ShowcaseSection';