Tab switcher
This commit is contained in:
@@ -2,9 +2,9 @@ import { homeItems } from "../../data";
|
||||
import PostCard from "../Card";
|
||||
import Content from "../Content";
|
||||
|
||||
const Home = () => {
|
||||
const Home = ({ selected }) => {
|
||||
return (
|
||||
<Content>
|
||||
<Content visible={selected}>
|
||||
{homeItems.map(i => (
|
||||
<PostCard {...i} />
|
||||
))}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { homeItems } from "../../data";
|
||||
import Content from "../Content";
|
||||
|
||||
const Profile = () => {
|
||||
const Profile = ({ selected }) => {
|
||||
return (
|
||||
<Content>
|
||||
<Content visible={selected}>
|
||||
<h2>Profile</h2>
|
||||
</Content>
|
||||
)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import Content from "../Content";
|
||||
|
||||
const Settings = () => {
|
||||
const Settings = ({ selected }) => {
|
||||
return (
|
||||
<Content className="p-4">
|
||||
<Content visible={selected}>
|
||||
<h2>Settings</h2>
|
||||
</Content>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user