Skip to content

Commit

Permalink
feat: Add navigation and styling to StakeScreen (fix/omnifixes)
Browse files Browse the repository at this point in the history
- Add useAppNavigation hook for navigation functionality
- Import fontSemibold20 from style/fonts
- Add headerChildren prop to ScreenContainer for custom header text
- Add responsive prop to ScreenContainer for responsive layout
- Add onBackPress prop to ScreenContainer for navigation back button
  • Loading branch information
omniwired committed Sep 25, 2023
1 parent da1c2c2 commit a8e9eb1
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions packages/screens/Stake/StakeScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,13 @@ import { useIsMobile } from "../../hooks/useIsMobile";
import { useSelectedNetworkId } from "../../hooks/useSelectedNetwork";
import { useValidators } from "../../hooks/useValidators";
import { NetworkKind } from "../../networks";
import { fontSemibold28 } from "../../utils/style/fonts";
import { useAppNavigation } from "../../utils/navigation";
import { fontSemibold20, fontSemibold28 } from "../../utils/style/fonts";
import { layout } from "../../utils/style/layout";

export const StakeScreen: React.FC = () => {
const navigation = useAppNavigation();

const isMobile = useIsMobile();
const selectedNetworkId = useSelectedNetworkId();
const [stakeDetailModalVisible, setStakeDetailModalVisible] = useState(false);
Expand Down Expand Up @@ -48,7 +51,6 @@ export const StakeScreen: React.FC = () => {
const [selectedTab, setSelectedTab] = useState<keyof typeof tabs>("active");
const areThereWallets = useAreThereWallets();

// functions
const toggleDetailModal = (stakeData?: ValidatorInfo) => {
setStakeDetailModalVisible(!stakeDetailModalVisible);
setSelectedStake(stakeData);
Expand All @@ -70,7 +72,12 @@ export const StakeScreen: React.FC = () => {
};

return (
<ScreenContainer fullWidth forceNetworkKind={NetworkKind.Cosmos}>
<ScreenContainer
forceNetworkKind={NetworkKind.Cosmos}
headerChildren={<BrandText style={fontSemibold20}>Stake</BrandText>}
responsive
onBackPress={() => navigation.goBack()}
>
<View
style={{
flexDirection: isMobile ? "column" : "row",
Expand Down

0 comments on commit a8e9eb1

Please sign in to comment.