ntphuc149 commited on
Commit
02ae15a
Β·
verified Β·
1 Parent(s): c2b3c74

Update src/App.js

Browse files
Files changed (1) hide show
  1. src/App.js +66 -56
src/App.js CHANGED
@@ -75,13 +75,21 @@ const ZodiacIcon = ({ sign, size = 24, className = "" }) => {
75
  };
76
 
77
  const HoroscopeApp = () => {
78
- const [selectedSign, setSelectedSign] = useState("taurus");
79
  const [selectedGender, setSelectedGender] = useState("female");
80
  const [selectedPeriod, setSelectedPeriod] = useState("today");
81
  const [selectedCategory, setSelectedCategory] = useState("love");
82
  const [isDarkMode, setIsDarkMode] = useState(false);
83
 
84
  const zodiacSigns = [
 
 
 
 
 
 
 
 
85
  {
86
  id: "taurus",
87
  name: "Taurus",
@@ -90,30 +98,6 @@ const HoroscopeApp = () => {
90
  symbol: "♉",
91
  imageFile: "TAURUS.png",
92
  },
93
- {
94
- id: "sagittarius",
95
- name: "Sagittarius",
96
- dates: "Nov 22 - Dec 21",
97
- emoji: "🏹",
98
- symbol: "♐",
99
- imageFile: "SAGITTARIUS.png",
100
- },
101
- {
102
- id: "pisces",
103
- name: "Pisces",
104
- dates: "Feb 19 - Mar 20",
105
- emoji: "🐠",
106
- symbol: "β™“",
107
- imageFile: "PISCES.png",
108
- },
109
- {
110
- id: "libra",
111
- name: "Libra",
112
- dates: "Sep 23 - Oct 22",
113
- emoji: "βš–οΈ",
114
- symbol: "β™Ž",
115
- imageFile: "LIBRA.png",
116
- },
117
  {
118
  id: "gemini",
119
  name: "Gemini",
@@ -122,6 +106,14 @@ const HoroscopeApp = () => {
122
  symbol: "β™Š",
123
  imageFile: "GEMINI.png",
124
  },
 
 
 
 
 
 
 
 
125
  {
126
  id: "leo",
127
  name: "Leo",
@@ -139,28 +131,12 @@ const HoroscopeApp = () => {
139
  imageFile: "VIRGO.png",
140
  },
141
  {
142
- id: "aquarius",
143
- name: "Aquarius",
144
- dates: "Jan 20 - Feb 18",
145
- emoji: "🏺",
146
- symbol: "β™’",
147
- imageFile: "AQUARIUS.png",
148
- },
149
- {
150
- id: "aries",
151
- name: "Aries",
152
- dates: "Mar 21 - Apr 19",
153
- emoji: "🐏",
154
- symbol: "β™ˆ",
155
- imageFile: "ARIES.png",
156
- },
157
- {
158
- id: "cancer",
159
- name: "Cancer",
160
- dates: "Jun 21 - Jul 22",
161
- emoji: "πŸ¦€",
162
- symbol: "β™‹",
163
- imageFile: "CANCER.png",
164
  },
165
  {
166
  id: "scorpio",
@@ -170,6 +146,14 @@ const HoroscopeApp = () => {
170
  symbol: "♏",
171
  imageFile: "SCORPIO.png",
172
  },
 
 
 
 
 
 
 
 
173
  {
174
  id: "capricorn",
175
  name: "Capricorn",
@@ -178,6 +162,22 @@ const HoroscopeApp = () => {
178
  symbol: "β™‘",
179
  imageFile: "CAPRICORN.png",
180
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
181
  ];
182
 
183
  const periods = [
@@ -350,16 +350,28 @@ const HoroscopeApp = () => {
350
  </span>
351
  </button>
352
 
353
- {/* App Icon - Visible on mobile */}
354
- <div className="sm:hidden">
355
  <div className="inline-flex items-center justify-center w-12 h-12 bg-gradient-to-r from-blue-400 to-purple-500 rounded-full shadow-lg">
356
  <i className="ri-magic-line text-xl text-white"></i>
357
  </div>
358
  </div>
359
 
360
- {/* Gender Selection */}
 
 
 
 
 
 
 
 
 
 
 
 
361
  <div
362
- className={`flex rounded-full p-1 shadow-lg ${
363
  isDarkMode ? "bg-white bg-opacity-10" : "bg-white bg-opacity-90"
364
  }`}
365
  >
@@ -373,8 +385,7 @@ const HoroscopeApp = () => {
373
  : "text-gray-600 hover:text-pink-400"
374
  }`}
375
  >
376
- <span className="hidden sm:inline">Female</span>
377
- <i className="ri-women-line sm:hidden"></i>
378
  </button>
379
  <button
380
  onClick={() => setSelectedGender("male")}
@@ -386,8 +397,7 @@ const HoroscopeApp = () => {
386
  : "text-gray-600 hover:text-blue-400"
387
  }`}
388
  >
389
- <span className="hidden sm:inline">Male</span>
390
- <i className="ri-men-line sm:hidden"></i>
391
  </button>
392
  </div>
393
  </div>
@@ -669,4 +679,4 @@ const HoroscopeApp = () => {
669
  );
670
  };
671
 
672
- export default HoroscopeApp;
 
75
  };
76
 
77
  const HoroscopeApp = () => {
78
+ const [selectedSign, setSelectedSign] = useState("aries");
79
  const [selectedGender, setSelectedGender] = useState("female");
80
  const [selectedPeriod, setSelectedPeriod] = useState("today");
81
  const [selectedCategory, setSelectedCategory] = useState("love");
82
  const [isDarkMode, setIsDarkMode] = useState(false);
83
 
84
  const zodiacSigns = [
85
+ {
86
+ id: "aries",
87
+ name: "Aries",
88
+ dates: "Mar 21 - Apr 19",
89
+ emoji: "🐏",
90
+ symbol: "β™ˆ",
91
+ imageFile: "ARIES.png",
92
+ },
93
  {
94
  id: "taurus",
95
  name: "Taurus",
 
98
  symbol: "♉",
99
  imageFile: "TAURUS.png",
100
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
101
  {
102
  id: "gemini",
103
  name: "Gemini",
 
106
  symbol: "β™Š",
107
  imageFile: "GEMINI.png",
108
  },
109
+ {
110
+ id: "cancer",
111
+ name: "Cancer",
112
+ dates: "Jun 21 - Jul 22",
113
+ emoji: "πŸ¦€",
114
+ symbol: "β™‹",
115
+ imageFile: "CANCER.png",
116
+ },
117
  {
118
  id: "leo",
119
  name: "Leo",
 
131
  imageFile: "VIRGO.png",
132
  },
133
  {
134
+ id: "libra",
135
+ name: "Libra",
136
+ dates: "Sep 23 - Oct 22",
137
+ emoji: "βš–οΈ",
138
+ symbol: "β™Ž",
139
+ imageFile: "LIBRA.png",
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
140
  },
141
  {
142
  id: "scorpio",
 
146
  symbol: "♏",
147
  imageFile: "SCORPIO.png",
148
  },
149
+ {
150
+ id: "sagittarius",
151
+ name: "Sagittarius",
152
+ dates: "Nov 22 - Dec 21",
153
+ emoji: "🏹",
154
+ symbol: "♐",
155
+ imageFile: "SAGITTARIUS.png",
156
+ },
157
  {
158
  id: "capricorn",
159
  name: "Capricorn",
 
162
  symbol: "β™‘",
163
  imageFile: "CAPRICORN.png",
164
  },
165
+ {
166
+ id: "aquarius",
167
+ name: "Aquarius",
168
+ dates: "Jan 20 - Feb 18",
169
+ emoji: "🏺",
170
+ symbol: "β™’",
171
+ imageFile: "AQUARIUS.png",
172
+ },
173
+ {
174
+ id: "pisces",
175
+ name: "Pisces",
176
+ dates: "Feb 19 - Mar 20",
177
+ emoji: "🐠",
178
+ symbol: "β™“",
179
+ imageFile: "PISCES.png",
180
+ },
181
  ];
182
 
183
  const periods = [
 
350
  </span>
351
  </button>
352
 
353
+ {/* App Icon - Visible on mobile - Fixed centering */}
354
+ <div className="sm:hidden flex-1 flex justify-center">
355
  <div className="inline-flex items-center justify-center w-12 h-12 bg-gradient-to-r from-blue-400 to-purple-500 rounded-full shadow-lg">
356
  <i className="ri-magic-line text-xl text-white"></i>
357
  </div>
358
  </div>
359
 
360
+ {/* Gender Selection - Toggle style on mobile, tabs on desktop */}
361
+ <button
362
+ onClick={() => setSelectedGender(selectedGender === 'male' ? 'female' : 'male')}
363
+ className={`flex items-center justify-center w-12 h-12 rounded-full font-medium transition-all duration-300 shadow-lg hover:scale-105 sm:hidden ${
364
+ isDarkMode
365
+ ? "bg-white bg-opacity-10 text-white hover:bg-opacity-20"
366
+ : "bg-white bg-opacity-90 text-gray-700 hover:bg-opacity-100"
367
+ }`}
368
+ >
369
+ <i className={selectedGender === 'male' ? 'ri-men-line text-xl' : 'ri-women-line text-xl'}></i>
370
+ </button>
371
+
372
+ {/* Gender Selection - Desktop tabs */}
373
  <div
374
+ className={`hidden sm:flex rounded-full p-1 shadow-lg ${
375
  isDarkMode ? "bg-white bg-opacity-10" : "bg-white bg-opacity-90"
376
  }`}
377
  >
 
385
  : "text-gray-600 hover:text-pink-400"
386
  }`}
387
  >
388
+ <span>Female</span>
 
389
  </button>
390
  <button
391
  onClick={() => setSelectedGender("male")}
 
397
  : "text-gray-600 hover:text-blue-400"
398
  }`}
399
  >
400
+ <span>Male</span>
 
401
  </button>
402
  </div>
403
  </div>
 
679
  );
680
  };
681
 
682
+ export default HoroscopeApp;