@schandlergarcia/sf-web-components 1.2.12 → 1.2.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@schandlergarcia/sf-web-components",
3
- "version": "1.2.12",
3
+ "version": "1.2.13",
4
4
  "description": "Reusable Salesforce web components library with Tailwind CSS v4 and shadcn/ui",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -1,16 +1,19 @@
1
1
  import { useState } from "react";
2
- import UIInput from '@/components/ui/UIInput';
3
- import UIButton from '@/components/ui/UIButton';
2
+ import { useNavigate } from "react-router";
3
+ import UIInput from '@/components/library/ui/UIInput';
4
+ import UIButton from '@/components/library/ui/UIButton';
4
5
  import { Search } from "lucide-react";
5
6
 
6
7
  export default function HomePage() {
7
8
  const [searchQuery, setSearchQuery] = useState("");
9
+ const navigate = useNavigate();
8
10
 
9
11
  const handleSearch = () => {
10
12
  const trimmed = searchQuery.trim();
11
13
  if (trimmed) {
12
- console.log("Search:", trimmed);
13
- // Navigate to your search results page
14
+ navigate(`/accounts?search=${encodeURIComponent(trimmed)}`);
15
+ } else {
16
+ navigate('/accounts');
14
17
  }
15
18
  };
16
19
 
@@ -44,7 +47,7 @@ export default function HomePage() {
44
47
  <UIButton onClick={handleSearch} variant="primary">
45
48
  Search
46
49
  </UIButton>
47
- <UIButton onClick={() => console.log("Browse All")} variant="secondary">
50
+ <UIButton onClick={() => navigate('/accounts')} variant="secondary">
48
51
  Browse All
49
52
  </UIButton>
50
53
  </div>