Skip to content

Commit

Permalink
Run prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
adityapawar1 committed Apr 24, 2024
1 parent 789ae90 commit 80c450f
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 24 deletions.
18 changes: 13 additions & 5 deletions src/app/(tabs)/story/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,16 @@ function StoryScreen() {
</View>
)}
/>

</View>
<OptionBar story={story} storyId={parseInt(storyId as string, 10)} />
<OptionBar
story={story}
storyId={parseInt(storyId as string, 10)}
/>

<RenderHTML
source={{ html: `"${cheerio.load(story.excerpt.html ?? "").text()}"` }}
source={{
html: `"${cheerio.load(story.excerpt.html ?? '').text()}"`,
}}
baseStyle={globalStyles.h2}
contentWidth={width}
systemFonts={fonts}
Expand All @@ -120,7 +124,8 @@ function StoryScreen() {
systemFonts={fonts}
source={story.content}
contentWidth={width}
baseStyle={styles.story} />
baseStyle={styles.story}
/>

<TouchableOpacity>
<Icon type="share_outline" />
Expand Down Expand Up @@ -150,7 +155,10 @@ function StoryScreen() {
</Text>
</View>

<OptionBar story={story} storyId={parseInt(storyId as string, 10)} />
<OptionBar
story={story}
storyId={parseInt(storyId as string, 10)}
/>

<Button
textColor="black"
Expand Down
6 changes: 1 addition & 5 deletions src/components/AuthorImage/AuthorImage.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
import { router } from 'expo-router';
import {
Text,
TouchableOpacity,
View,
} from 'react-native';
import { Text, TouchableOpacity, View } from 'react-native';
import { Image } from 'expo-image';

import styles from './styles';
Expand Down
2 changes: 1 addition & 1 deletion src/components/FavoriteStoryButton/FavoriteStoryButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export default function FavoriteStoryButton({
}

setStoryIsFavorited(value);
}, [channels[Channel.FAVORITES][storyId]])
}, [channels[Channel.FAVORITES][storyId]]);

const favoriteStory = async (favorited: boolean) => {
setStoryIsFavorited(favorited);
Expand Down
21 changes: 10 additions & 11 deletions src/components/OptionBar/OptionBar.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import { Share } from 'react-native';
import Icon from '../../../assets/icons';
import { View } from "react-native";
import ReactionPicker from "../ReactionPicker/ReactionPicker";
import SaveStoryButton from "../SaveStoryButton/SaveStoryButton";
import FavoriteStoryButton from "../FavoriteStoryButton/FavoriteStoryButton";
import { TouchableOpacity } from "react-native-gesture-handler";
import styles from "./styles";
import { View } from 'react-native';
import ReactionPicker from '../ReactionPicker/ReactionPicker';
import SaveStoryButton from '../SaveStoryButton/SaveStoryButton';
import FavoriteStoryButton from '../FavoriteStoryButton/FavoriteStoryButton';
import { TouchableOpacity } from 'react-native-gesture-handler';
import styles from './styles';
import { Story } from '../../queries/types';

type OptionBarProps = {
storyId: number
story: Story
}
storyId: number;
story: Story;
};

function OptionBar({ storyId, story }: OptionBarProps) {
const onShare = async () => {
Expand Down Expand Up @@ -45,8 +45,7 @@ function OptionBar({ storyId, story }: OptionBarProps) {
</TouchableOpacity>
</View>
</View>

)
);
}

export default OptionBar;
3 changes: 1 addition & 2 deletions src/components/OptionBar/styles.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import { StyleSheet } from 'react-native';

const styles = StyleSheet.create({
Expand All @@ -14,7 +13,7 @@ const styles = StyleSheet.create({
alignSelf: 'flex-end',
gap: 8,
flexDirection: 'row',
}
},
});

export default styles;

0 comments on commit 80c450f

Please sign in to comment.