Skip to content

Commit

Permalink
chore: misc cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Rexogamer committed Feb 13, 2025
1 parent aefdea0 commit 5477c5d
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 5 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ module.exports = {
'react/react-in-jsx-scope': 0,
'react-native/no-inline-styles': 0, // TODO: turn this back on when the codebase is less error-filled
},
ignorePatterns: ['dist'],
};
4 changes: 2 additions & 2 deletions App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ export const App = () => {
<GestureHandlerRootView style={localStyles.outer}>
<ThemeContext.Provider
value={{currentTheme: theme, setCurrentTheme: setTheme}}>
{/* <ErrorBoundary fallbackRender={ErrorMessage}> */}
<ErrorBoundary fallbackRender={ErrorMessage}>
<MainView />
{/* </ErrorBoundary> */}
</ErrorBoundary>
</ThemeContext.Provider>
</GestureHandlerRootView>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ import MaterialIcon from 'react-native-vector-icons/MaterialIcons';

import type {API, Server} from 'revolt.js';

// import {app} from '@clerotri/Generic';
import {styles} from '@clerotri/Theme';
import {Text} from '@clerotri/components/common/atoms';
import {SettingsEntry} from '@clerotri/components/common/settings/atoms';
import {ThemeContext} from '@clerotri/lib/themes';
import {commonValues, ThemeContext} from '@clerotri/lib/themes';

export const InviteSettingsSection = observer(({server}: {server: Server}) => {
const {currentTheme} = useContext(ThemeContext);
Expand All @@ -30,7 +31,40 @@ export const InviteSettingsSection = observer(({server}: {server: Server}) => {

return (
<>
<Text type={'h1'}>{t('app.servers.settings.invites.title')}</Text>
<View
style={{
flexDirection: 'row',
alignItems: 'center',
marginVertical: commonValues.sizes.medium,
}}>
<View style={{flex: 1}}>
<Text type={'h1'}>{t('app.servers.settings.invites.title')}</Text>
</View>
{/* TODO: add channel selector
{server.havePermission('InviteOthers') ? (
<Pressable
onPress={() => {
app.openCreateChannelModal({
server,
callback: () => {},
});
}}
style={{
width: 30,
height: 20,
alignItems: 'center',
justifyContent: 'center',
}}>
<View style={styles.iconContainer}>
<MaterialIcon
name={'add'}
size={20}
color={currentTheme.foregroundPrimary}
/>
</View>
</Pressable>
) : null} */}
</View>
{invites ? (
invites.length ? (
invites.map(i => (
Expand Down
2 changes: 1 addition & 1 deletion src/lib/utils/utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Linking, Platform, ToastAndroid} from 'react-native';
import {Linking} from 'react-native';

import {differenceInMinutes} from 'date-fns/differenceInMinutes';
import {isSameDay} from 'date-fns/isSameDay';
Expand Down

0 comments on commit 5477c5d

Please sign in to comment.