36 lines
837 B
TypeScript
36 lines
837 B
TypeScript
import constants from "lib/constants";
|
|
import Head from "components/Head";
|
|
import styles from "../../styles/Index.module.sass";
|
|
|
|
const Social = (props) => {
|
|
return (
|
|
<>
|
|
<Head redirect={props} />
|
|
<div className={styles.center}>
|
|
<p className={styles.name}>
|
|
{props.site}
|
|
</p>
|
|
</div>
|
|
</>
|
|
);
|
|
};
|
|
|
|
|
|
export async function getStaticPaths() {
|
|
let socials = Object.keys(constants.socials).map(a => `/socials/${a}`)
|
|
return {
|
|
paths: [...socials],
|
|
fallback: false
|
|
}
|
|
}
|
|
|
|
export async function getStaticProps({ params }) {
|
|
return {
|
|
props: {
|
|
site: params.social,
|
|
url: constants.socials[params.social]
|
|
}
|
|
}
|
|
}
|
|
|
|
export default Social;
|