diff --git a/front/components/V2/GoldenRatio.tsx b/front/components/V2/GoldenRatio.tsx
index f17d5c4..9860fe3 100644
--- a/front/components/V2/GoldenRatio.tsx
+++ b/front/components/V2/GoldenRatio.tsx
@@ -1,10 +1,8 @@
import React from 'react';
import { View } from 'react-native';
-import { useBreakpointValue } from 'native-base';
+import { useBreakpointValue, Text } from 'native-base';
import HomeMainSongCard from './HomeMainSongCard';
-
-const bigSideRatio = 1000;
-const smallSideRatio = 618;
+import GoldenRatioPanel from './GoldenRatioPanel';
type HomeCardProps = {
image: string;
@@ -44,80 +42,30 @@ const cards = [
const GoldenRatio = () => {
const screenSize = useBreakpointValue({ base: 'small', md: 'big' });
const isPhone = screenSize === 'small';
+ // return (r>}>test)
return (
- }
>
- }
>
-
-
-
- }
>
-
-
-
- }
>
-
-
-
-
-
+
-
-
-
-
-
+
+
+
+
);
};
diff --git a/front/components/V2/GoldenRatioPanel.tsx b/front/components/V2/GoldenRatioPanel.tsx
new file mode 100644
index 0000000..e5b0824
--- /dev/null
+++ b/front/components/V2/GoldenRatioPanel.tsx
@@ -0,0 +1,60 @@
+import { View, ViewStyle } from 'react-native';
+
+const bigSideRatio = 1000;
+const smallSideRatio = 618;
+
+const bigSizePercent = '61.8%';
+const smallSizePercent = '38.2%';
+
+type GoldenRatioPanelProps = {
+ direction: 'row' | 'column' | 'row-reverse' | 'column-reverse';
+ header: React.ReactNode;
+ children: React.ReactNode;
+ style?: ViewStyle;
+};
+
+const isVerticalDir = (direction: GoldenRatioPanelProps['direction']) => {
+ return direction === 'column' || direction === 'column-reverse';
+};
+
+const GoldenRatioPanel = ({ direction, header, children, style }: GoldenRatioPanelProps) => {
+ const firstSizePercent = bigSizePercent;
+ const secondSizePercent = smallSizePercent;
+ const isVertical = isVerticalDir(direction);
+ return (
+
+
+ {header}
+
+
+ {children}
+
+
+ );
+};
+
+GoldenRatioPanel.defaultProps = {
+ direction: 'row',
+};
+
+export default GoldenRatioPanel;
diff --git a/front/views/V2/DiscoveryView.tsx b/front/views/V2/DiscoveryView.tsx
index cc6f94a..e55afb6 100644
--- a/front/views/V2/DiscoveryView.tsx
+++ b/front/views/V2/DiscoveryView.tsx
@@ -38,17 +38,49 @@ const HomeView = (props: RouteProps<{}>) => {
// }, [artistsQueries]);
return (
-
+ //
+
-
+
+
+ {'Suggestions'}
+
+ {songsQuery.isLoading && Loading...}
+ {/* ) => {
gap: 16,
}}
>
-
- {'Suggestions'}
-
- {songsQuery.isLoading && Loading...}
-
- {songsQuery.data?.map((song) => (
- {
- navigation.navigate('Play', { songId: song.id });
- }}
- onPlay={() => {
- console.log('play');
- }}
- />
- ))}
-
-
+ {songsQuery.data?.map((song) => (
+ {
+ navigation.navigate('Play', { songId: song.id });
+ }}
+ onPlay={() => {
+ console.log('play');
+ }}
+ />
+ ))}
+ */}
-
+
+ //
);
};