feat: complete scheduled publishing, security remediation and DEV_TICKETS implementation
This commit is contained in:
1 parent
d6d4158cbe
commit
efb3c473c4
35 files changed
+685
-185
No files matched your search
@@ -52,16 +52,24 @@ export interface BlogPostItem {
|
||||
export default function BlogPage({
|
||||
blogs = [],
|
||||
categories = [],
|
||||
initialCategoryId = 'ALL',
|
||||
}: {
|
||||
blogs: BlogPostItem[];
|
||||
categories?: BlogCategory[];
|
||||
initialCategoryId?: string;
|
||||
}) {
|
||||
const router = useRouter();
|
||||
const [products, setProducts] = useState<Product[]>([]);
|
||||
const [selectedCategory, setSelectedCategory] = useState<string>("ALL");
|
||||
const [selectedCategory, setSelectedCategory] = useState<string>(initialCategoryId);
|
||||
const [searchQuery, setSearchQuery] = useState<string>("");
|
||||
const [selectedTag, setSelectedTag] = useState<string | null>(null);
|
||||
|
||||
React.useEffect(() => {
|
||||
if (initialCategoryId) {
|
||||
setSelectedCategory(initialCategoryId);
|
||||
}
|
||||
}, [initialCategoryId]);
|
||||
|
||||
React.useEffect(() => {
|
||||
productService.getProducts({ limit: 8 }).then((res) => setProducts(res.data));
|
||||
}, []);
|
||||
@@ -184,7 +192,10 @@ export default function BlogPage({
|
||||
{/* Category Filter Pills */}
|
||||
<div className="flex items-center gap-2 overflow-x-auto pb-1 scrollbar-none">
|
||||
<button
|
||||
onClick={() => setSelectedCategory("ALL")}
|
||||
onClick={() => {
|
||||
setSelectedCategory("ALL");
|
||||
router.replace('/blog', { scroll: false });
|
||||
}}
|
||||
className={`px-4 py-2 rounded-2xl text-xs font-black transition-all cursor-pointer whitespace-nowrap ${
|
||||
selectedCategory === "ALL"
|
||||
? "bg-canina-blue text-white shadow-md shadow-canina-blue/20 scale-102"
|
||||
@@ -196,7 +207,10 @@ export default function BlogPage({
|
||||
{categories.map((c) => (
|
||||
<button
|
||||
key={c.id}
|
||||
onClick={() => setSelectedCategory(c.id)}
|
||||
onClick={() => {
|
||||
setSelectedCategory(c.id);
|
||||
router.replace(`/blog?categoryId=${c.id}`, { scroll: false });
|
||||
}}
|
||||
className={`px-4 py-2 rounded-2xl text-xs font-black transition-all cursor-pointer whitespace-nowrap ${
|
||||
selectedCategory === c.id
|
||||
? "bg-canina-blue text-white shadow-md shadow-canina-blue/20 scale-102"
|
||||
|
||||
Reference in new issue
Block a user