Unique keys
This commit is contained in:
parent
7e6f8b3b2f
commit
a8710a96b6
@ -11,6 +11,8 @@ interface ILayoutProps {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const Layout: NextPage<ILayoutProps> = ({ title, children }) => {
|
const Layout: NextPage<ILayoutProps> = ({ title, children }) => {
|
||||||
|
const socialLinks = socials("1.1em").map((social, i) => <a key={i} href={social.url} target="_blank" rel="noreferrer" className={styles.socialIcon}>{social.icon}</a>);
|
||||||
|
|
||||||
return <>
|
return <>
|
||||||
<Head>
|
<Head>
|
||||||
<title>{title ?? "c0ntroller.de"}</title>
|
<title>{title ?? "c0ntroller.de"}</title>
|
||||||
@ -29,10 +31,7 @@ const Layout: NextPage<ILayoutProps> = ({ title, children }) => {
|
|||||||
<span className={styles.footerContent}>
|
<span className={styles.footerContent}>
|
||||||
<span>© 2022 Daniel Kluge</span>
|
<span>© 2022 Daniel Kluge</span>
|
||||||
<span className={styles.divider}>|</span>
|
<span className={styles.divider}>|</span>
|
||||||
{socials("1.1em").map((social, i) => <>
|
{socialLinks.flatMap((social, i) => i !== 0 ? [<span className={styles.divider} key={`d${i}`}>|</span>, social] : [social])}
|
||||||
{i !== 0 ? <span className={styles.divider} key={`d${i}`}>|</span> : null}
|
|
||||||
<a key={i} href={social.url} target="_blank" rel="noreferrer" className={styles.socialIcon}>{social.icon}</a>
|
|
||||||
</>)}
|
|
||||||
<span className={styles.divider}>|</span>
|
<span className={styles.divider}>|</span>
|
||||||
<a className="nostyle" target="_blank" href="mailto:admin-website@c0ntroller.de" rel="noreferrer">Contact</a>
|
<a className="nostyle" target="_blank" href="mailto:admin-website@c0ntroller.de" rel="noreferrer">Contact</a>
|
||||||
</span>
|
</span>
|
||||||
|
@ -56,6 +56,8 @@ const Terminal: NextPage<{ buildTime: string }> = ({ buildTime }) => {
|
|||||||
|
|
||||||
const iconSize = "1.3em";
|
const iconSize = "1.3em";
|
||||||
|
|
||||||
|
const socialLinks = socials(iconSize, "var(--repl_color)").map((social, i) => <a key={i} href={social.url} target="_blank" rel="noreferrer" className={styles.iconLink}>{social.icon}</a>);
|
||||||
|
|
||||||
return (<main onKeyDown={hideModalOnEsc} tabIndex={-1}>
|
return (<main onKeyDown={hideModalOnEsc} tabIndex={-1}>
|
||||||
<Head>
|
<Head>
|
||||||
<title>c0ntroller.de</title>
|
<title>c0ntroller.de</title>
|
||||||
@ -72,10 +74,7 @@ const Terminal: NextPage<{ buildTime: string }> = ({ buildTime }) => {
|
|||||||
<span className={styles.divider}>|</span>
|
<span className={styles.divider}>|</span>
|
||||||
<a href="mailto:admin-website@c0ntroller.de" rel="noreferrer" target="_blank" className={styles.iconLink}><Icon path={mdiEmail} color="var(--repl_color)" size="1.5em" id="mdi_terminal_nav_email" title="Email" /></a>
|
<a href="mailto:admin-website@c0ntroller.de" rel="noreferrer" target="_blank" className={styles.iconLink}><Icon path={mdiEmail} color="var(--repl_color)" size="1.5em" id="mdi_terminal_nav_email" title="Email" /></a>
|
||||||
<span className={styles.divider}>|</span>
|
<span className={styles.divider}>|</span>
|
||||||
{socials(iconSize, "var(--repl_color)").map((social, i) => <>
|
{socialLinks.flatMap((social, i) => i !== 0 ? [<span className={styles.divider} key={`d${i}`}>|</span>, social] : [social])}
|
||||||
{i !== 0 ? <span className={styles.divider} key={`d${i}`}>|</span> : null}
|
|
||||||
<a key={i} href={social.url} target="_blank" rel="noreferrer" className={styles.iconLink}>{social.icon}</a>
|
|
||||||
</>)}
|
|
||||||
<span className={styles.spacer} onClick={focusInput}> </span>
|
<span className={styles.spacer} onClick={focusInput}> </span>
|
||||||
</div>
|
</div>
|
||||||
<REPL inputRef={inputRef} buildTime={buildTime} />
|
<REPL inputRef={inputRef} buildTime={buildTime} />
|
||||||
|
Loading…
Reference in New Issue
Block a user