feature & fix

deskripsi:
feature :
- forumku

fix :
- forum index
- Back button : bisa custom icon
- Button custom : di tambah href
# No Issue
This commit is contained in:
2025-07-14 14:12:01 +08:00
parent ac9dae7c5b
commit fbde2fd031
8 changed files with 172 additions and 75 deletions

View File

@@ -3,19 +3,33 @@ import { Ionicons } from "@expo/vector-icons";
import { Href, router } from "expo-router";
/**
*
*
* @param path - path to navigate to ?
* @default router.back()
* @returns if path : router.replace(path) else router.back()
*/
const LeftButtonCustom = ({path}: {path?: Href}) => {
const LeftButtonCustom = ({
path,
icon = "arrow-back",
iconCustom,
}: {
path?: Href;
icon?: React.ReactNode | any;
iconCustom?: React.ReactNode;
}) => {
return (
<Ionicons
name="arrow-back"
size={20}
color={MainColor.yellow}
onPress={() => path ? router.replace(path) : router.back()}
/>
<>
{iconCustom ? (
iconCustom
) : (
<Ionicons
name={icon}
size={20}
color={MainColor.yellow}
onPress={() => (path ? router.replace(path) : router.back())}
/>
)}
</>
);
};