[ABANDONED] React/Redux front end for the Flexor social network.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

29 lines
704 B

import React, { FC, useEffect } from 'react'
import { Link } from 'react-router-dom'
import { Entity } from 'src/types'
import './directory.scss'
interface Props {
groups: Entity[]
fetchGroups: () => void
}
const Directory: FC<Props> = ({ groups, fetchGroups }) => {
useEffect(() => {
fetchGroups()
}, [])
return (
<div>
<h1 className="title">Communities</h1>
{groups.length === 0 && <p>No Communities</p>}
<p className="has-text-centered">
<Link className="has-text-weight-bold has-text-primary" to="/register">Create your own Community</Link>
</p>
</div>
)
}
export default Directory