parent
c40757873a
commit
adddcc0367
11 changed files with 75 additions and 10 deletions
@ -0,0 +1,27 @@ |
||||
import React, { useState } from "react"; |
||||
|
||||
import ProfileInfo from "./ProfileInfo"; |
||||
import ProfilePicNextToEachOther from "./ProfilePicNextToEachOther"; |
||||
|
||||
function Avatar() { |
||||
const list = { |
||||
1: <ProfileInfo />, |
||||
2: <ProfilePicNextToEachOther />, |
||||
}; |
||||
const [type, setType] = useState(1); |
||||
return ( |
||||
<div className="w-full flex flex-col items-center"> |
||||
<select |
||||
className="mb-10 w-20 bg-gray-200" |
||||
onChange={(e) => setType(e.target.value)} |
||||
> |
||||
{Object.keys(list).map((option, index) => ( |
||||
<option key={index}>{option}</option> |
||||
))} |
||||
</select> |
||||
{list[type]} |
||||
</div> |
||||
); |
||||
} |
||||
|
||||
export default Avatar; |
@ -0,0 +1,27 @@ |
||||
import React, { useState } from "react"; |
||||
|
||||
import DistributedData from "./DistributedData"; |
||||
import ReligiousTimes from "./ReligiousTimes"; |
||||
|
||||
function Advertisements() { |
||||
const list = { |
||||
1: <DistributedData />, |
||||
2: <ReligiousTimes />, |
||||
}; |
||||
const [type, setType] = useState(1); |
||||
return ( |
||||
<div className="w-full flex flex-col items-center"> |
||||
<select |
||||
className="mb-10 w-20 bg-gray-200" |
||||
onChange={(e) => setType(e.target.value)} |
||||
> |
||||
{Object.keys(list).map((option, index) => ( |
||||
<option key={index}>{option}</option> |
||||
))} |
||||
</select> |
||||
{list[type]} |
||||
</div> |
||||
); |
||||
} |
||||
|
||||
export default Advertisements; |
Loading…
Reference in new issue