Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion apps/web/src/pages/customer/DiscoveryPage/DiscoveryPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { useAuthStore } from '@soly/shared';
import { DiscoveryHeader } from './components/DiscoveryHeader/DiscoveryHeader';
import * as styles from './styles';
import { SearchBar } from './components/SearchBar/SearchBar';
import { CategoryPills } from './components/CategoryPills/CategoryPills';
export const DiscoveryPage = () => {
const user = useAuthStore((state) => state.user);
const token = useAuthStore((state) => state.token);
Expand All @@ -12,7 +13,7 @@ export const DiscoveryPage = () => {
<div style={styles.pageContainer}>
<DiscoveryHeader name={name} avatar={avatar} />
<SearchBar />
{/* CategoryPills — next */}
<CategoryPills />

Copilot AI Apr 23, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR description still contains an incomplete issue reference (Fixes SOLY-). Please link the correct ticket/issue ID (or remove the placeholder) so the change is traceable.

Copilot uses AI. Check for mistakes.
{/* PromoBanner — next */}
{/* SectionHeader + BusinessCards — next */}
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import { useState } from 'react';
import { theme } from 'antd';
import { SolyTypography } from '@soly/ui';
import * as styles from './styles';

const CATEGORIES = [
{ key: 'all', label: 'הכל' },
{ key: 'hair', label: '💈 ספרות' },
{ key: 'nails', label: '💅 ציפורניים' },
{ key: 'styling', label: '💇 עיצוב שיער' },
{ key: 'skincare', label: '🧴 טיפוח עור' },
{ key: 'massage', label: '🫧 עיסוי' },
];

export const CategoryPills = () => {
const { token } = theme.useToken();
const [active, setActive] = useState('all');

return (
<div style={styles.scrollContainerStyle}>
{CATEGORIES.map(({ key, label }) => (
<button
key={key}
type="button"
style={
active === key
? styles.activePillStyle
: styles.getInactivePillStyle(token)
}
onClick={() => setActive(key)}
>
<SolyTypography
variant="captionInherit"
color={active === key ? 'white' : token.colorText}
>
{label}
</SolyTypography>
</button>
))}
</div>
);
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import type { CSSProperties } from 'react';
import type { GlobalToken } from 'antd';
import { colors } from '@soly/shared';

export const scrollContainerStyle: CSSProperties = {
display: 'flex',
flexDirection: 'row',
gap: '0.5rem',
overflowX: 'auto',
padding: '0 1rem',
scrollbarWidth: 'none',
};

export const activePillStyle: CSSProperties = {
background: colors.gradientPrimary,
border: '1px solid transparent',
borderRadius: 20,
padding: '0.35rem 0.85rem',
cursor: 'pointer',
whiteSpace: 'nowrap',
flexShrink: 0,
};

export const getInactivePillStyle = (token: GlobalToken): CSSProperties => ({
backgroundColor: token.colorBgContainer,
border: `1px solid ${token.colorBorder}`,
borderRadius: 20,
padding: '0.35rem 0.85rem',
cursor: 'pointer',
whiteSpace: 'nowrap',
flexShrink: 0,
});
Loading