@oxyhq/services
Version:
Reusable OxyHQ module to handle authentication, user management, karma system, device-based session management and more 🚀
133 lines (131 loc) • 4.37 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _reactNative = require("react-native");
var _components = require("../../components");
var _useI18n = require("../../hooks/useI18n");
var _jsxRuntime = require("react/jsx-runtime");
const KarmaRewardsScreen = ({
goBack,
theme
}) => {
const {
t
} = (0, _useI18n.useI18n)();
const isDarkTheme = theme === 'dark';
const backgroundColor = isDarkTheme ? '#121212' : '#FFFFFF';
const textColor = isDarkTheme ? '#FFFFFF' : '#000000';
const primaryColor = '#d169e5';
// Placeholder: In a real app, fetch rewards from API
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
style: [styles.container, {
backgroundColor
}],
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Header, {
title: t('karma.rewards.title') || 'Karma Rewards',
subtitle: t('karma.rewards.subtitle') || 'Unlock special features and recognition',
theme: theme,
onBack: goBack,
elevation: "subtle"
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.ScrollView, {
contentContainerStyle: styles.contentContainer,
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
style: [styles.paragraph, {
color: textColor
}],
children: t('karma.rewards.intro') || 'Unlock special features and recognition by earning karma!'
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
style: styles.rewardBox,
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
style: [styles.rewardTitle, {
color: primaryColor
}],
children: t('karma.rewards.earlyAccess.title') || '🎉 Early Access'
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
style: [styles.rewardDesc, {
color: textColor
}],
children: t('karma.rewards.earlyAccess.desc') || 'Get early access to new features with 100+ karma.'
})]
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
style: styles.rewardBox,
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
style: [styles.rewardTitle, {
color: primaryColor
}],
children: t('karma.rewards.badge.title') || '🏅 Community Badge'
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
style: [styles.rewardDesc, {
color: textColor
}],
children: t('karma.rewards.badge.desc') || 'Earn a special badge for 500+ karma.'
})]
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
style: styles.rewardBox,
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
style: [styles.rewardTitle, {
color: primaryColor
}],
children: t('karma.rewards.featured.title') || '🌟 Featured Member'
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
style: [styles.rewardDesc, {
color: textColor
}],
children: t('karma.rewards.featured.desc') || 'Be featured in the community for 1000+ karma.'
})]
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
style: [styles.paragraph, {
color: textColor,
marginTop: 24
}],
children: t('karma.rewards.moreComing') || 'More rewards coming soon!'
})]
})]
});
};
const styles = _reactNative.StyleSheet.create({
container: {
flex: 1
},
contentContainer: {
padding: 24,
paddingTop: 20
},
rewardBox: {
backgroundColor: '#f7eaff',
borderRadius: 16,
padding: 18,
marginBottom: 18,
..._reactNative.Platform.select({
web: {
boxShadow: '0 1px 4px rgba(0,0,0,0.04)'
},
default: {
shadowColor: '#000',
shadowOpacity: 0.04,
shadowOffset: {
width: 0,
height: 1
},
shadowRadius: 4,
elevation: 1
}
})
},
rewardTitle: {
fontSize: 18,
fontWeight: 'bold',
marginBottom: 6
},
rewardDesc: {
fontSize: 15
},
paragraph: {
fontSize: 16,
marginBottom: 12
}
});
var _default = exports.default = KarmaRewardsScreen;
//# sourceMappingURL=KarmaRewardsScreen.js.map