Skip to content

Commit

Permalink
small ios fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaskuh committed Nov 3, 2024
1 parent 3318445 commit ec805b7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 2 additions & 0 deletions components/companies/CompanyDetailsHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ const styles = StyleSheet.create({
container: {
flexDirection: "row",
alignItems: "center",
justifyContent: "flex-start",
gap: 16,
flexGrow: 1,
},
icon: {
width: 42,
Expand Down
12 changes: 6 additions & 6 deletions screens/companies/CompanyDetailsScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { IconLinkButton } from "components/companies/IconLinkButton";
import { ShowOptions, TagsList } from "components/companies/TagsList";
import { useHeaderHeight } from "@react-navigation/stack";
import CompanyDetailsHeader from "components/companies/CompanyDetailsHeader";
import { useSafeAreaInsets } from "react-native-safe-area-context";

type CompanyDetailsScreenParams = {
route: {
Expand All @@ -28,6 +29,7 @@ export default function CompanyDetailsScreen({
route,
}: CompanyDetailsScreenParams) {
const { id } = route.params;
const insets = useSafeAreaInsets();

const [company, setCompany] = useState<PublicCompanyDto | null>(null);
const [loading, setLoading] = useState<boolean>(true);
Expand All @@ -46,13 +48,14 @@ export default function CompanyDetailsScreen({
: 0;


const greenZone = false;
const greenZone = true;

const getCompany = async () => {
setLoading(true);

const company = await API.companies.getCompany(id);
setCompany(company);
console.log(company);

setLoading(false);
};
Expand All @@ -65,7 +68,7 @@ export default function CompanyDetailsScreen({
const navigation = useNavigation();


const height = useHeaderHeight();
// const height = useHeaderHeight();


useEffect(() => {
Expand Down Expand Up @@ -101,8 +104,7 @@ export default function CompanyDetailsScreen({
}

return (
<View style={styles.outerContainer}>
<Animated.ScrollView onContentSizeChange={(width, height) => {setContentHeight(height); setScreenHeight(Dimensions.get('window').height)}}
<Animated.ScrollView style={{paddingTop: insets.top}} onContentSizeChange={(width, height) => {setContentHeight(height); setScreenHeight(Dimensions.get('window').height)}}
onScroll={Animated.event(
[
{
Expand Down Expand Up @@ -193,7 +195,6 @@ export default function CompanyDetailsScreen({

</View>
</Animated.ScrollView>
</View>
);
}

Expand All @@ -204,7 +205,6 @@ const styles = StyleSheet.create({
},
colorBackgroundContainer: {
flexDirection: "column",
overflow: "hidden",
alignItems: "center",
justifyContent: "flex-end",
width: "100%",
Expand Down

0 comments on commit ec805b7

Please sign in to comment.