mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 18:44:16 +00:00
29 lines
769 B
JavaScript
29 lines
769 B
JavaScript
import React from "react"
|
|
import config from "config"
|
|
|
|
import "./index.less"
|
|
|
|
export default (props) => {
|
|
const renderLinks = () => {
|
|
return config.footerLinks.map((link, index) => {
|
|
let linkProps = {
|
|
key: index,
|
|
}
|
|
|
|
if (link.url) {
|
|
linkProps.href = link.url
|
|
}
|
|
|
|
if (link.location) {
|
|
linkProps.onClick = () => {
|
|
app.setLocation(link.location)
|
|
}
|
|
}
|
|
|
|
return <>| <a {...linkProps}>{link.label}</a> {index === config.footerLinks.length - 1 ? "|" : ""} </>
|
|
})
|
|
}
|
|
return <div className="footer">
|
|
{config.app.copyright} {config.footerLinks ? renderLinks() : null}
|
|
</div>
|
|
} |